I have a control file and a data file that look like this:
CONTROLFILE1:
RECOVERABLE
LOAD DATA
INFILE "D:\KING\DATAFILE.txt"
APPEND
CONCATENATE 1
INTO TABLE TABLE1
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(
USERID CHAR(7),
COUNTRY CHAR(100),
FIRSTNAME EXPRESSION "SELECT USERNAME FROM USER_TABLE WHERE ID=3",
ACTIVE_FLAG CONSTANT 'Y',
CHANGE_DT SYSDATE ,
)
DATAFILE.TXT
1,INDIA
5,USA
19,RUSSIA
I'm not able to load the data into TABLE1.
It's showing the error "FIRSTNAME" (Expression missing..)
I need to use the result of select query as a insert value. How can I do this?