Thanks for the help, but, there seems to be some problem here while running the script,
here is the error message from prompted by the sql query analyzer:
Server: Msg 207, Level 16, State 3, Line 1
Invalid column name 'dt1'.
Any idea what's the error here?