Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > Putting it Together > Databases

Closed Thread
 
LinkBack Thread Tools
Old March 7th, 2004, 10:52 PM   #1
New Member
 

Join Date: Aug 2003
Location: USA
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 ekendricks is on a distinguished road
Delete Specific Records

Using SQL 2000 and ASP

I have one table "Obituary", and a second table "GBComments". The "Obituary" table has a field "Sponsored" which is an expiration date for entries to GBComments to be seen by the public. Entries to the GBComments has the "ID" of the Obituary table to identify GBComments records with those of the Obituary record.

What I need to accomplish is to delete all records in the GBComments table WHERE the "Sponsored" Date (which is in the Obituary Table)is =< Today.

If someone could shed some light on this, I would greatly appreciate it.

Thanks

Ernest
ekendricks is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old March 8th, 2004, 02:23 AM   #2
WebForumz Admin Badge
 

Join Date: Jul 2003
Posts: 1,848
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 117 Webforumz Staff is on a distinguished road
I don't remember the exact sytnax of it, but I'd say try something like:

DELETE FROM GBComments WHERE ID IN (SELECT ID FROM Obituary WHERE Sponsored =<Date)

That should be close, I don't have time to look it up at the moment but will if it doesn't work for you.
Webforumz Staff is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Bookmarks

Tags
delete , specific , records


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP/MYSQL Displaying records Ydot PHP 6 July 23rd, 2007 03:12 AM
Loading specific flash movies for specific pages koonkle Flash and ActionScript 3 May 22nd, 2007 02:23 PM
Array Multiple records jfergy Classic ASP 6 January 17th, 2006 01:44 PM
reversing records benbacardi Classic ASP 2 September 4th, 2004 01:59 PM
Random records.. u2orange Databases 6 March 8th, 2004 06:31 AM


Search Engine Optimization by vBSEO 3.2.0 RC8