Solved

Invalid Identifier Error

Posted on 2016-09-21
3
82 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
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 500 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Creating and Managing Databases with phpMyAdmin in cPanel.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

910 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now