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 |
sam9s
Starting Member
2 Posts |
Posted - 2011-07-19 : 07:10:29
|
First of all I am absolute new to this SSIS thing. And this is my first post. So bear with me if the query sounds lame.I have a table with 5,6 columns with a collumn as NAME, which has all the names of the employees. I want to run a query which would search the name from the table and then delete the entire row corresponding to that name.Can this be done through SSIS package or any other way .....Thanks in advanceRegardsSammy |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-07-19 : 08:04:31
|
for example to delete all rows where name='webfred':You can do that in a query window or in SSIS package in a sql task.delete table where Name='webfred'edit: typo No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
sam9s
Starting Member
2 Posts |
Posted - 2011-07-19 : 08:42:06
|
quote: Originally posted by webfred for example to delete all rows where name='webfred':You can do that in a query window or in SSIS package in a sql task.delete table where Name='webfred'edit: typo No, you're never too old to Yak'n'Roll if you're too young to die.
webfred, thanks for the reply, this query would delete the row for the name I specify like 'webfred'. I want the system/database to ask me which user to delete. Like if I run the package I should get a pop up or something to mention the name of the user. Once done the script will delete the entire row corresponding to that name/user. Can that be done or I am asking too much ......Thanks in advanceRegardsSammy |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-07-19 : 09:08:54
|
As far as I know there is no simple way to get such a dialog... No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
lightsql
Starting Member
17 Posts |
Posted - 2011-07-20 : 05:24:06
|
You will need to use the script task for the message box to return the name of the employee to be deleted. Use EXECUTE SQL TASK to perform the delete process.A word of caution though as you may delete the entire content of the table, you may add additional filter to ensure you are deleting the correct field. |
|
|
|
|
|