Solved

Invalid Identifier Error

Posted on 2016-09-21
3
64 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á
Comment Utility
There is misspel

POVARGMTHD.VENDOR=APVENMAST.VENDOR

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

Expert Comment

by:awking00
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article describes some very basic things about SQL Server filegroups.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

763 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

9 Experts available now in Live!

Get 1:1 Help Now