I have a reference table with values already inserted and I want to insert the appropriate value into another table according to the user input. Can I use a select statement within my insert such as the following?? The SELECT query gives me just what I want, but DB2 won't let me do it:
INSERT INTO tbl1 VALUES('val1','val2','valn',
SELECT val_id FROM tbl2 WHERE "value1 < userinput" AND "value2 > userinput"
Thanks for any and all help!!
INSERT INTO tbl1 VALUES('val1','val2','valn',
SELECT val_id FROM tbl2 WHERE "value1 < userinput" AND "value2 > userinput"
Thanks for any and all help!!