Re: Update Status Field after Expiry Date



Consider the following table <<

Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, data types, etc. in
your schema are. Sample data is also a good idea, along with clear
specifications. It is very hard to debug code when you do not let us
see it. Here is my guess, unsupporteed by anythign you told us

CREATE TABLE Customers -- plutal names for sets, please
( cust_id char(10)
accountExpiryDate datetime
accountStatus bit

Now, I want to update the accountStatus to False as soon as the
current date becomes accountExpiryDate.

I think it can be done using "SQL Agent" but my webhost doesnt provide
me access to that. I have access only to the Query Analyzer.

Thanks
Shane


.



Relevant Pages

  • Re: Sub-Query / Cross Join / or something else?
    ... constraints, Declarative Referential Integrity, data types, etc. in ... your schema are. ... Sample data is also a good idea, ...
    (comp.databases.ms-sqlserver)
  • Re: SQL Query Question
    ... constraints, Declarative Referential Integrity, data types, etc. in ... your schema are. ... Sample data is also a good idea, ... non-ISO-8601 date format in your vague narratives.. ...
    (comp.databases.ms-sqlserver)
  • Re: Query/View: The 2 newest periods for each indicator
    ... constraints, Declarative Referential Integrity, data types, etc. in ... your schema are. ... Sample data is also a good idea, ...
    (comp.databases.ms-sqlserver)
  • Re: I want to avoid using a cursor, please!
    ... constraints, Declarative Referential Integrity, data types, etc. in ... your schema are. ... Sample data is also a good idea, ... avoid FLOAT in favor of DECIMAL unless you like rounding errors. ...
    (comp.databases.ms-sqlserver)
  • Re: Update sub query
    ... constraints, Declarative Referential Integrity, data types, etc. in ... your schema are. ... Sample data is also a good idea, ...
    (comp.databases.ms-sqlserver)