Geeks With Blogs
Deepak Tumkur March 2009 Entries
parametizing to SQLCMD
Today , i had an requirement to pass arguments to sql scripts and discovered -v switch in SQLCMD . with this we can parameterize scripts in a minute. SQLScript stored in create.sql CREATE TABLE (%root) -- variable executing the below should create a table sqlcmd -S servername -d databasename -U username -P password -i create.sql -v root="mytable1"

Posted On Thursday, March 19, 2009 4:46 AM

Copyright © DeepakTumkur | Powered by: