Microsoft
Software
Hardware
Network
Question : CASE....WHEN USING A DATE COMPARISON
I would like to create a column in an SQL Server query that produces a text result based on the comparions of a date in another field. My query looks like this :
SELECT ACCOUNT_ID, ACCOUNT_YEAR, FILED_DATE,
(CASE FILED_DATE
WHEN >= CDATE(12/31/2100) THEN 'KEYED'
WHEN < CDATE(12/31/2000) THEN 'WEB'
END) AS AUDIT_STATUS
FROM ppAuditPartIa
And of course it doesn't work..syntax error near '>'
Answer : CASE....WHEN USING A DATE COMPARISON
SELECT ACCOUNT_ID, ACCOUNT_YEAR, FILED_DATE,
(CASE
WHEN FILED_DATE >= '12/31/2100' THEN 'KEYED'
WHEN FILED_DATE < '12/31/2000' THEN 'WEB'
END) AS AUDIT_STATUS
FROM ppAuditPartIa
Random Solutions
onmouseout event - ajax
sound comes out of headphones and not speakers at times
receiving error 0x800ccc92 when trying to receive mail in Outlook 2003
Changes services via bat file
SQL Reporting - convert datetime to date only format
Ruby on Rails: Dealing with many-to-many relationships in one view
Server 2003 Maximum Boot Partition?
Help with creating Bootable CD-ROM with Windows 98 and BIOS files
Outlook forms stay in my outbox after being sent and cause major problems.
Need older revs of HP LaserJet 42x0 drivers