P
phil2phil
Hi,
I'm working on an asp where I wanted to do a simple insert using data
from another table, structure is:
Table A has columns - ID, Code, Type
Table B has columns - key, FName, LNAme, DOB, cd, etc...
I need to insert into A, using only the 'key' field from B, rest of the
values in A will be hardcoded in (code='XYZ', TYPE='A')
I tried this:
insert into TableA
values
(select key from TableB where cd='app', 'XYZ', 'A')
but it didn't work, I kept getting an error 'Missing Expression', using
Oracle 9i.
Also tried speicifying the columns
insert into TableA (ID, Code, Type)
values
(select key from TableB where cd='app', 'XYZ', 'A')
same error. Could someone help me with the insert.
Thanks.
I'm working on an asp where I wanted to do a simple insert using data
from another table, structure is:
Table A has columns - ID, Code, Type
Table B has columns - key, FName, LNAme, DOB, cd, etc...
I need to insert into A, using only the 'key' field from B, rest of the
values in A will be hardcoded in (code='XYZ', TYPE='A')
I tried this:
insert into TableA
values
(select key from TableB where cd='app', 'XYZ', 'A')
but it didn't work, I kept getting an error 'Missing Expression', using
Oracle 9i.
Also tried speicifying the columns
insert into TableA (ID, Code, Type)
values
(select key from TableB where cd='app', 'XYZ', 'A')
same error. Could someone help me with the insert.
Thanks.