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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Delete Query Help Please

Author  Topic 

Jonny1409
Posting Yak Master

133 Posts

Posted - 2007-11-17 : 15:13:33
Hello,

I've got a Holidays table with several entries in, including Employee number, holiday date etc.
I've also got an Employee table with a record for each person, including Full Name, Holiday Group etc.

I've created a view using the above tables which shows all holidays on a particular date for certain holiday groups(I've had to bring in the employee table as I need the Holiday Group)

I would like the delete the rows this view creates, but I can't just delete them from the view as this will try to delete from the employee table.

What syntax do I need for this please ?

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2007-11-17 : 19:19:50
It is not clear what you want. You created a view to return a certain set of records. Now you want to delete them?

Be more specific about what you want to "delete". (I think you just want a where clause, or perhaps a GROUP BY to restrict the amount of records to return.

You might also add DISTINCT (Select DISTINCT )




Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page

Jonny1409
Posting Yak Master

133 Posts

Posted - 2007-11-19 : 03:09:37
Please Ignore this - it is now resolved.
Go to Top of Page
   

- Advertisement -