Regarding OSQL.

  • Hi all

    Is it possible to get column values from an sql table and store it in batch file variables?

    OSQL does sumthg but i am not aware about the syntax of how to implement it.

    Help me out on this....

    Thanks in advance

  • I don't believe you can store this in variables with osql.

    Powershell can do something like this if you install it on your servers.

  • Hi Steve

    Like in a batch file(suppose test.bat) v define variables as %1,%2 etc and v pass values to them at command line like:

    c:>test 'a' 'b'

    So is there no way v can pass column values from an SQL 2000 table to these variable from command line instead of directly specifying(as in this case as 'a' , 'b')?

    Thanks

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply