|
Posted by Ed Murphy on 03/27/07 04:57
--CELKO-- wrote:
> Notice I dropped the redundant BIT column. Some newbie actually used
> a proprietary, low-level BIT data type. You need to fix that at once
> and teach the guy that SQL has no BOOLEAN data types -- that is just
> sooooo fundamental!
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
> CREATE VIEW ActiveCustomers (..)
> AS
> SELECT cust_id, acctexpiry_date, ..
> FROM Customers
> WHERE CURRENT_TIMESTAMP < acctexpiry_date;
If the expiration date is "expires after this date" rather than "expires
on this date", then change the WHERE clause to
WHERE CURRENT_TIMESTAMP < DateAdd(dd, 1, acctexpiry_date);
Navigation:
[Reply to this message]
|