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
Resize Ghost Image
Remote Agent Not Installed Error
delete message on exchange server with out remove mailbox or user account
Microsoft Access Open Email Message (Outlook) and populate it with data from the database!
Convert datetime to US (mm-dd-yyyy) format - MS SQL Server 2000
input dd/mm/yyyy date format in MSAccess entered as mm/dd/yyyy how to avoid?
Restrict outgoing email for certain users
Check if FTP upload was successful
Event ID: 1505 - insufficient system resources exist to complete the requested service
make menuconfig and Realtek 8139 NIC in Debian 3.0 2.2.19