More of a SQL Server question...

Results 1 to 3 of 3

Thread: More of a SQL Server question...

  1. #1
    Join Date
    Dec 1969

    Default More of a SQL Server question...

    But I thought I would bring it to the pros (YOU!). Anyways, enuf of the *** kissing.<BR><BR>I&#039;ve got a site on which people post some products for sale. On this post they have a time period of how long they want it to be posted. This is calculated and a date of EndDate goes into my SQL database.<BR><BR>I also have a field Active (1 or 0). Once the EndDate is equal to todays date, how can I get this Active field to change from 1 to 0.<BR><BR>Thanks for any help, this is my first time working with SQL Server (2000 btw).

  2. #2
    Join Date
    Dec 1969

    Default RE: More of a SQL Server question...

    Why do you need to hold an Active yes/no field at all?<BR><BR>You can always tell what is active by simply selecting records with an EndDate Later than today.<BR><BR>Save your database the effort of maintaining an extra field.

  3. #3
    Join Date
    Dec 1969

    Default but if you MUST ...

    If you must set the active field then look up "Jobs" and "SQL Agent" in BoL.<BR><BR>The agent must be running to allow you schedule jobs; but then the agent will be running so that your automatic db backups happen (you are backing up aren&#039;t you :-)

Posting Permissions

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