Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Invalid Identifier Error

Posted on 2016-09-21
3
Medium Priority
?
144 Views
Last Modified: 2016-09-26
I'm trying to write a query with the following code:

left outer join APVENMAST on PROCUREGRP.VENDOR_GROUP=APVENMAST.VENDOR_GROUP and POVARGMTHD.VENDOR=APVENMAST.VENDOR

But get the following error:
ORA-00904: "POVARGMTHD"."VENDOR": invalid identifier
00904. 00000 -  "%s: invalid identifier"

I've written another simple query and everything works.
SELECT *
FROM PROD.POVAGRMTHD pov,
     PROD.APVENMAST apv
     
where apv.vendor_group = pov.procure_group
and   apv.vendor = pov.vendor

Can someone tell me what I might be missing to correct the issue.
0
Comment
Question by:metalteck
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 22

Expert Comment

by:Helena Marková
ID: 41810086
There is misspel

POVARGMTHD.VENDOR=APVENMAST.VENDOR

this is ok
PROD.POVAGRMTHD pov, ..
0
 
LVL 32

Expert Comment

by:awking00
ID: 41810591
Your first query shows a left outer join while your second query is equivalent to an inner join.
0
 
LVL 2

Accepted Solution

by:
larryh earned 2000 total points
ID: 41810746
The typo pointed out by @Henka would be the first thing to check.  If that's not the issue...

Your problem query has this expression
POVARGMTHD.VENDOR

Your query that works has
PROD.POVAGRMTHD

It may be your problem query needs to be corrected to the following:
left outer join APVENMAST on PROCUREGRP.VENDOR_GROUP=APVENMAST.VENDOR_GROUP and PROD.POVAGRMTHD.VENDOR=APVENMAST.VENDOR

where you add the "PROD." to the table name.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question