|
rcjay272
Starting Member
USA
1 Posts |
Posted - 01/12/2013 : 12:53:05
|
All,
I am new to creating scripts to run on SQL. My goal is to create a script that allows me to query one table for an "id" value and then run a delete statement on another table to delete a row.
These are the SQL commands I run manually and I would like to automate this so I don't have to get into SQL MGMT Studio each time.
select id from user where uName='johndoe'
Output 09123a6b
Delete from othertable where uid='09123a6b'
However.....I want to script this so I can run it like a batch file with a variable. Is this possible? Where do I start?
I would like something like this....this is just an example of how I think it should work.
c:\deleteuser.bat johndoe
Thank you,
Rob |
|