REDUCE Scripts (OpenInsight Specific)
At 17 OCT 2001 10:32:55AM Steve Carlson wrote:
I need to perform the following select using
REDUCE(REDUCE_SCRIPT, SORT_LIST, MODE, "EMPLOYEES", CURSORVAR, FLAG)
.
The REDUCE_SCRIPT is :
WITH {STATUS} EQ "ACTIVE" AND
(WITH {AGENCY_DESC} EQ "Chicago" OR WITH {AGENT_NUMBER} GT 1)
.
In other words, all records must be "ACTIVE",
Running the above gives me -0- records…Am I using the "( )"
wrong???
Running:
WITH {STATUS} EQ "ACTIVE" AND WITH {AGENCY_DESC} EQ "Chicago" OR WITH {AGENT_NUMBER} GT 1
Gives me ACTIVE in Chicago PLUS ALL with Agent_Number ] 1… notjust the Active.
THANKS..
STEVE C.
At 17 OCT 2001 11:35AM Don Miller - C3 Inc. wrote:
Steve ..
Your script is:
WITH {STATUS} EQ "ACTIVE" AND WITH {AGENCY_DESC} EQ "Chicago" OR WITH {AGENT_NUMBER} GT 1
I suggest:
WITH (STATUS EQ "ACTIVE") AND (WITH AGENCY_DESC EQ "Chicago" OR WITH AGENT_NUMBER GT 1)
This should yield all ACTIVE and with agency_desc either equal to Chicago or Agent_Number greater than 1
That should work
Don