June 9, 2008 at 4:55 am
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.
March 8, 2011 at 2:07 am
Hi
I have the same issue. I get the same below error. Can someone help?
osql: Error converting exit value.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy