I have a bat file that contains some sql commands and a sql query statement. The query inside the script ran fine by itself and was able to return all the rows under sql analyzer. So I put this query into the script that will open up a database connection and shoudl return and format the returned rows into a report. The problem is that if I ran this script, it will return 0 rows. I have reused the same script with other queries in it, and it gave me all the rows that I needed. If I copy and paste the content in the bat file and dump onto a command prompt manually, then all rows are returned correctly. I am very puzzled on this as I have verfied my script character by character and still don't have a clue of what I did wrong.
Guru: please shed some light...
Guru: please shed some light...
Comment