Tricky Order By in SQL?
Date: 1995/11/27
Message-ID: <49cpk3$1oa_at_denver.denver.ssds.com>#1/1
SELECT UNIQUE GRADE_REQ, GRADE_CD
Sample Data:
I want the query to return unique GRADE_REQs and ORDER BY GRADE_CD:
MAJ
Any ideas?? Thanks in advance :)
Kathy Davis
FROM REF_GRADE
WHERE GRADE_CD > 'F5' AND GRADE_CD < 'Q5'
ORDER BY GRADE_CD;
I have a table REF_GRADE with several columns. I only need two of them
for this application: GRADE_REQ and GRADE_CD. GRADE_CD is the key to the
table.
GRADE_REQ GRADE_CD
LTS H5
LTS I5
MAJ E5
LTS
The problem is when I include the GRADE_CD in the SELECT statement, in
order to do the ORDER BY, Oracle sees the GRADE_CD as unique, and it
returns both LTS H5 and LTS I5.
kmd_at_ssds.com
GRC International, Inc.
Fayetteville, NC
Received on Mon Nov 27 1995 - 00:00:00 CET