satinsilhouette
Instructor
- Feb 21, 2006
- 625
Hi I need to name this case statement as a field in a query:
SELECT CASE WHEN ACMNTHDR.DFLT_ACCT_UNIT = ' ' THEN ACACTIVITY.ACCT_UNIT ELSE ACMNTHDR.DFLT_ACCT_UNIT END
FROM ACMNTHDR INNER JOIN
LAW9.ACACTIVITY ON ACMNTHDR.REV_ACTIVITY = ACACTIVITY.ACTIVITY
When I do this
(SELECT CASE WHEN LAW9.ACMNTHDR.DFLT_ACCT_UNIT = ' ' THEN LAW9.ACACTIVITY.ACCT_UNIT ELSE LAW9.ACMNTHDR.DFLT_ACCT_UNIT END
FROM LAW9.ACMNTHDR INNER JOIN
LAW9.ACACTIVITY ON LAW9.ACMNTHDR.REV_ACTIVITY = LAW9.ACACTIVITY.ACTIVITY) AS ACCT I get an error back.
Thanks so much!
satinsilhouette
SELECT CASE WHEN ACMNTHDR.DFLT_ACCT_UNIT = ' ' THEN ACACTIVITY.ACCT_UNIT ELSE ACMNTHDR.DFLT_ACCT_UNIT END
FROM ACMNTHDR INNER JOIN
LAW9.ACACTIVITY ON ACMNTHDR.REV_ACTIVITY = ACACTIVITY.ACTIVITY
When I do this
(SELECT CASE WHEN LAW9.ACMNTHDR.DFLT_ACCT_UNIT = ' ' THEN LAW9.ACACTIVITY.ACCT_UNIT ELSE LAW9.ACMNTHDR.DFLT_ACCT_UNIT END
FROM LAW9.ACMNTHDR INNER JOIN
LAW9.ACACTIVITY ON LAW9.ACMNTHDR.REV_ACTIVITY = LAW9.ACACTIVITY.ACTIVITY) AS ACCT I get an error back.
Thanks so much!
satinsilhouette