SQL Server 2005: passing params to SP by reading from a file?
We already have stored procedures in place to update or insert to a table; what we would like to do now is to pass in an .XLS (or whatever) with the associated parameters, from which SQL Server could read row by row and determine which SP to run. Something like this...
SP sessionID facilityID category mfr model num_units
UPDATE 10001 100 sedan Ford Taurus 3
UPDATE 10003 105 sedan Honda Accord -2
INSERT 10010 107 minivan Chrysler T&C 2
UPDATE 10015 110 pickup Dodge Ram 1
INSERT 10020 113 pickup Chevrolet Silverado 3
UPDATE 10022 117 suv Toyota RAV4 -1
We have about 1000+ rows of data to be either updated or added; surely this can be automated in this way, can't it? TIA for your help!