Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ryandavebrigino@yahoo.com
Starting Member
9 Posts |
Posted - 2008-07-31 : 22:16:55
|
| good day everyone. I need to schedule a task that will delete a record from a table automatically at the end of day.unfortunately, I need to apply this in SQL Server Express Edition. so SQL job wont be an option.currently I am eploring SQLCMD and try running commands in command promt. I created a .sql file to pass on the C:\sqlcmd -i this is the fileMLScript.sqland it contains the code...-------------use davedbgoDELETE from employeego--------------when I run this in command promt.C:\sqlcmd -i d:\MLScript.sqlit works fine and delete's the data.but I need to perform this automatically at the end of day.I tried setting this up in windows scheduled task but it doesnt work.can any body share some idea or work around on how to perform DML automatically.thanks guy's |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-07-31 : 22:25:33
|
| why don't you go for other edition if this is important? |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-07-31 : 23:43:13
|
| Is d:\ a local disk on the machine? Did you get any error from windows task? Tried specify -S, -U and -P options in sqlcmd? |
 |
|
|
|
|
|