I am new in dynamic sql and I do not have a good tutorial to read. I wanted create two dynamic sql queries.
1. Script name - test_Fix.sql
2. Copy the original &1..test table to &1.. test _<sysdate, including time >.
3. Then recreate the &1..test table with a CTAS reading from the &1.. CONTACT _<sysdate> table.
4. While creating the &1..test table, drop records from the table that have - where trim(first_name) is null and trim(last_name) is null.
1. Script name test2 _Fix.sql
2. Copy the original &1..test2 table to &1..test2 _<sysdate, including time>.
3. Then recreate the &1..test2 table with a CTAS reading from the &1..test2 _<sysdate> table.
4. While creating the &1..test2 table, if answer_date is equal to 10/16/2209 change it to 10/16/2009
I will really appreciate if some one can help me with dynamic sql query.
Best Regards, Guy Przytula
Database Software Consultant
Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
Information Server Datastage Certified http://www.infocura.be