|
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 :(
[Back to original message]
|