You are here: Re: Update Status Field after Expiry Date « MsSQL Server « IT news, forums, messages
Re: Update Status Field after Expiry Date

Posted by shane.taylor81 on 03/28/07 21:21

Thanks to CELKO for being so critical.

1) It is pretty obvious that this cannot be the design for my actual
table, this was to simplify the post.

> CREATE TABLE Customers -- plutal names for sets, please
> ( cust_id char(10)
Thanks again from the "newbie"


>You need to fix that at once and teach the guy that SQL has no BOOLEAN data types -- that is just sooooo >fundamental!
Did not know that.

> Yes and no. It's optional, so *of course* every major implementation
> deals with it differently.
>
> http://troels.arvin.dk/db/rdbms/#data_types-boolean
To CELKO : Would want your comments on this for "MS SQL Server"

> Change accountStatus to
>
> accountStatus AS (CASE WHEN accountExpirydate < getdate()
> THEN convert(bit, 1)
> ELSE convert(bit, 0)
> END)

Works Great!!! However, I would go with CELKO's view solution. I have
to create a VIEW on that table anyways.


To CELKO:- You could have conveyed the message better by being a less
rude :(

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация