I'v enever seen this one before so any help would be greatly appreciated.
SQL
SELECT DISTINCT
;
TABLE
ON TABLE HOLD AS ELIG_DET1
END
-RUN
DEFINES MAY BE SET TO OLD OR COMPILED
DEFINES MAY BE SET TO OLD OR COMPILED
1
0 NUMBER OF RECORDS IN TABLE= 73 LINES= 73
0
1
0 NUMBER OF RECORDS IN TABLE= 76 LINES= 76
0
1
0 NUMBER OF RECORDS IN TABLE= 76 LINES= 76
0
1
0 NUMBER OF RECORDS IN TABLE= 76 LINES= 76
0
1
0 NUMBER OF RECORDS IN TABLE= 140 LINES= 140
0
1
0 NUMBER OF RECORDS IN TABLE= 140 LINES= 140
0
(FOC010) THE NUMBER OF SORT FIELDS EXCEEDS THE MAXIMUM: SQLHLD06.E33
(FOC009) INCOMPLETE REQUEST STATEMENT
BYPASSING TO END OF COMMAND
Any ideas?This message has been edited. Last edited by: rfbowley,
Robert F. Bowley Jr. Owner TaRa Solutions, LLC
In WebFOCUS since 2001
September 09, 2012, 05:44 AM
j.gross
The E33 part is the FOCUS alias for the 33rd data column.
Processing of "DISTINCT" requires sorting. The limit (on the number of sort keys in one segment of the internal matrix) is 32.
Since your WHERE requires SUB_CNCL_DT, TYP_COV_FL, and IDE.CASE_STAT_CD to have specified values, it is pointless to include them in the list.
- - - - -
I suggest you identify a set of key fields that guarantee uniqueness of the remaining columns' values, and use a request of the form
JOIN ...
TABLE FILE ... SUM FST.X FST.Y ... BY A BY B ... WHERE ...
(where A,B,... are the keys [presumably numbering well below the limit of 32] and X,Y,... the dependent fields).This message has been edited. Last edited by: j.gross,
September 10, 2012, 03:31 PM
rfbowley
At the Requst of Management, I have deleted the actual SQL code that contains 'identifiable' code from the original request.
The problem was, in a SQL report, there were a significant number of tables involved, with multi field joins, and a the SELECT DISTINCT cause the error. Changing to a simple SELECT solved the problem.