Hi everybody,
I'm trying to insert an osql command within a DOS batch file (which contains DOS commands) :
osql -S Server -U User -P PassWord -Q "select top 1 column1 from table1 a, table2 b where b.id=a.id"
I would like to use the value of the column1 in the continuation of my batch file.
I tried by using exit :
osql -S Server -U User -P PassWord -Q "exit(select top 1 column1 from table1 a, table2 b where b.id=a.id)"
But my problem is that the column1 is not an integer but a varchar, so I have an error message :
osql: Error converting exit value.
Any idea ? Many thanks for your help. 🙁