• whereas my solution was to write an application in C++ which lets me use a placeholder in a sql file, and specify a tab delimited text file to provide the values.

    -- test.sql

    SELECT TestTable.RowID, TestTable.RowName FROM TestTable WHERE TestTable.RowID = '@1'

    -- input.txt

    123
    321
    456
    654
    

    -- console

    querysql.exe -server=(local) -database=testdb -sql=test.sql -input=input.txt -output=output.txt

     

    very handy because I don't have to create any tempoary files with all the sql statements.  Output can be either to screen or to a file.  Works with either a ODBC-DSN or direct to the SQL server.

     

    Would this be of interest to anybody else?

    AucklandSQL User Group
    Independent SQL Server Consultant
    SQL Server MVP