Deleting using Jobs

Results 1 to 2 of 2

Thread: Deleting using Jobs

  1. #1
    Join Date
    Dec 1969

    Default Deleting using Jobs

    I have created a Job in SQL which deletes by date: <BR>DELETE FROM tblReunion WHERE ReunionDate &#060; getdate()-1 <BR><BR>What I also have is another table tblReunion_Reply that holds a list of people both are related via the ReunionID, how can I delete all corisponding data in the second table witin the same job? <BR><BR>Normally I delete them by passing the id into a SP but as this is doing it by date elasped is there a way to retrieve the id during deletion to pass into the second table, then thinking as I type what happens if there is more the one event to delete <BR><BR>Thanks for any ideas<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default You'll have to loop...

    Though in a stored procedure or asp...You can&#039;t grab the id as you go...<BR><BR>KLC

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts