I am new to DB2 SQL. I want to create a dynamic SQL statement like: INSERT INTO destinationtable SELECT * FROM sourcetable
I cannot use an EXECUTE IMMEDIATE statement for this because it contains a SELECT. I come from a SQL Server backround and it was easy to execute dynamic SQL by simple storing it in a string and then using EXEC. Is there a way to do this in DB2?
Thanks everyone!
Ric
I cannot use an EXECUTE IMMEDIATE statement for this because it contains a SELECT. I come from a SQL Server backround and it was easy to execute dynamic SQL by simple storing it in a string and then using EXEC. Is there a way to do this in DB2?
Thanks everyone!
Ric