|
-
Order by in UNION
Hi all
How can I specify order by clause for the follwing query If I give the following query its giving the following error
ERROR at line 3:
ORA-00904: invalid column name
If I remove 'order by a.Case_typ' its returning the rows.
SELECT DISTINCT A.CASE_TYP||A.CASE_SNO||'/'||CASE_YR,A.PTY_TYP||'->'||A.ACU_RID||'.'||A.ACU_NAME||','||A.CASE_TYP||A.CASE_SNO||'/'||A.CASE_YR FROM VEFS_CRMACU A WHERE A.CASE_TYP = 'CC'
union
SELECT DISTINCT A.CASE_TYP,A.PTY_TYP||'->'||A.DPP_RID||'.'||A.DPP_NAME||','||A.CASE_TYP||A.CASE_SNO||'/'||A.CASE_YR FROM VEFS_CRMDPP A WHERE A.CASE_TYP = 'CC' order by a.Case_typ
Thanks for your help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|