February 06, 2007, 05:02 PM
Tomsweb(FOC269) EQUALITY SCREENING TESTS MUST BE PROVIDED IN AN INDEXED VIEW
I have coded a table request like this:
TABLE FILE MGAFOCUS.BPCO
HEADING CENTER
"1 LIST ALL PCOS IN DATABASE 1"
" "
SUM BPCO
BY BPCO NOPRINT
IF BPCO NE ' '
END
-RUN
-EXIT
The MFD looks like this:
FILENAME=MGAFOCUS, SUFFIX=FOC, FDFC=19, FYRT=70
SEGNAME=ROOT, SEGTYPE=S4
FIELDNAME=BLOB, LINEOFBUSS, A3, INDEX=I,$
FIELDNAME=BMCO, MCO, A2, $
FIELDNAME=BSYMBOL, SYMBOL, A3, INDEX=I,$
FIELDNAME=BPOLICY_MOD, POLMOD, A9, INDEX=I,$
FIELDNAME=BEFFDATE, EFFDATE, I6YMD, $
FIELDNAME=BEXPDATE, EXPDATE, I6YMD, $
FIELDNAME=BSTATE, RISKSTATE, A2, $
FIELDNAME=BPCO, PCO, A2, INDEX=I,$
I thought the IF statement would take care of it...
But I keep getting the error msg captioned above...
Thanks,
February 06, 2007, 05:15 PM
TomswebI fixed it
.
I removed .BPCO from TABLE FILE MGAFOCUS.
Thanks!
February 07, 2007, 06:01 AM
OPALTOSHTomsweb,
The .BPCO option can only be used where you have an indexed field that you want to retrieve specific values of. FOCUS will use the index on the field to locate the matching records instead of using the normal retrieval method.
It gives you much faster access when you are wanting to retrieve specific values.
February 07, 2007, 10:45 AM
jgelonaTo expand on what OPALTOSH said, you got the error because you did not use an equality test. NE is not an equality test. One has to use EQ when using an indexed view.