Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Delete Query Help Please
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

133 Posts

Posted - 11/17/2007 :  15:13:33  Show Profile  Reply with Quote

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 ?

Flowing Fount of Yak Knowledge

1464 Posts

Posted - 11/17/2007 :  19:19:50  Show Profile  Send dataguru1971 an AOL message  Send dataguru1971 a Yahoo! Message  Reply with Quote
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

Posting Yak Master

133 Posts

Posted - 11/19/2007 :  03:09:37  Show Profile  Reply with Quote
Please Ignore this - it is now resolved.

Edited by - Jonny1409 on 11/19/2007 03:30:55
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000