Home » SQL & PL/SQL » SQL & PL/SQL » INVALID IDENTIFIER IN JOINING SCRIPT (SQL*PLUS, 10.2.0,XP)
icon4.gif  INVALID IDENTIFIER IN JOINING SCRIPT [message #342892] Mon, 25 August 2008 07:59 Go to next message
josephsjrmurrell
Messages: 8
Registered: August 2008
Junior Member
HI

i am using a script to join two tables together. i am getting the following error

ERROR at line 36:
ORA-00904: "A"."CUSTOMER_NO": invalid identifier


the script is as follows...

CREATE TABLE LEGACY_CIS.FIN_ADJS_ALL
as
SELECT
A.FIN_ADJS_KEY,
A.SERV_KEY,
A.SERVICE_NO,
A.CUSTOMER_NO,
A.ADJS_NO,
A.FIN_ADJS_DATE,
A.FIN_ADJS_TYPE,
A.FIN_ADJS_AMT,
A.VAT_ADJS,
A.DEP_TRANS_TYPE,
A.ACCOUNT_CODE,
A.WO_NUM,
A.ACCOUNT_LNK,
A.UNIT_LNK,
A.PROJECT_LNK,
A.CYCLE_NO,
B.TARIFF,
B.FIN_ADJS_REM,
B.AUTH_CODE,
B.DATE_OF_STAT,
B.CURRENTDATE,
B.CURRENT_TIME,
B.OPERATOR,
B.CHANGE_TYPE,
B.PROGRAM_NAME,
B.AUTHOR_ID,
B.AUTHOR_DATE
FROM FIN_ADJS A , FIN_ADJS_2 B 
WHERE  
    A.FIN_ADJS_KEY=B.FIN_ADJS_KEY 
AND A.SERV_KEY=B.SERV_KEY
AND A.SERVICE_NO=B.SERVICE_NO
AND A.CUSTOMER_NO=B.CUSTOMER_NO
AND A.ADJS_NO=B.ADJS_NO;

drop table FIN_ADJS;
drop table FIN_ADJS_2;


rename  FIN_ADJS_ALL  to  FIN_ADJS;


Re: INVALID IDENTIFIER IN JOINING SCRIPT [message #342895 is a reply to message #342892] Mon, 25 August 2008 08:03 Go to previous messageGo to next message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
You do not have a column CUSTOMER_NO in table FIN_ADJS.

[added]

And if you run this script, you have lost both of your source tables.

[Updated on: Mon, 25 August 2008 08:03]

Report message to a moderator

Re: INVALID IDENTIFIER IN JOINING SCRIPT [message #342900 is a reply to message #342895] Mon, 25 August 2008 08:11 Go to previous message
josephsjrmurrell
Messages: 8
Registered: August 2008
Junior Member
yea i know i lose them its supposed to add the second table onto the first as that is how it was originally. i am converting tables from an old powerhouse type environment into oracle tables, so i was unable to generate a text file to hold the entire table in the old environment so i divided it using the primary keys as joining criteria.
Previous Topic: Date conversation issue
Next Topic: Transfering files from one location to another location
Goto Forum:
  


Current Time: Mon Dec 05 14:56:29 CST 2016

Total time taken to generate the page: 0.29138 seconds