I'm using this (
http://gpoulose.home.att.net) ODBC tool to send ad-hoc queries to a DB2 7.2 server.
I simply want to declare a variable and use it later.
Example:
declare @iMyVar int
select * from Tbl1 where Col1 = @iMyVar
I keep getting a syntax error:
SQL0104N An unexpected token "@iMyVar" was found following "Declare ". Expected tokens may include: "JOIN <joined_table>". SQLSTATE=42601
State:42601,Native:-104,Origin:[IBM][CLI Driver][DB2/6000]
Any help is very much appreciated.