Steve
  The select count should look like this no dot on the variable
this_custnub2.

SEL COUNT(*) INTO vrows INDIC iv1 FROM Specinstr WHERE Custnub2 =
this_custnub2 AND UnitList = 'Y'

Buddy


-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Walker,
Buddy
Sent: Sunday, November 09, 2008 8:33 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: I do not have it right yet, do I ?

Steve
  If you already have the CustNub2 and you only want to find out if the
unitlist is y, n or null then why not just do this.

  SEL COUNT(*) INTO vrows INDIC iv1 FROM Specinstr WHERE Custnub2 =
.this_custnub2 AND UnitList = 'Y'

  IF vrows > 0 THEN
    SET VAR vcheck_list = ('Test1')
  ELSE
    SET VAR vcheck_list = ('Test2')
  ENDIF

Buddy


-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Steve
Breen
Sent: Sunday, November 09, 2008 8:05 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: I do not have it right yet, do I ?

Got it finally

 
SET VAR V1 INTEGER = NULL
SELECT CUSTNUB2 INTO V1 INDICATOR IV1 FROM SPECINSTR +
WHERE UNITLIST LIKE 'Y%' +
AND CUSTNUB2 = .THIS_CUSTNUB2

IF V1 = .THIS_CUSTNUB2 THEN
SET VAR VCHECK_LIST = 'TEST1'
ENDIF


SET VAR V2 INTEGER = NULL
SELECT CUSTNUB2 INTO V2 INDICATOR IV2 FROM SPECINSTR +
WHERE (UNITLIST LIKE 'N%' OR UNITLIST IS NULL)+
AND CUSTNUB2 = .THIS_CUSTNUB2

IF V2 = .THIS_CUSTNUB2 THEN
SET VAR VCHECK_LIST = 'TEST2'
ENDIF

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Walker,
Buddy
Sent: Sunday, November 09, 2008 7:10 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: I do not have it right yet, do I ?

Steve
 It appears that you are selecting all Custnub2 where unitlist = Y or N.
If Custnub2 is unique in specinstr table then you must use the custnub2
in the where clause.

  From the R:> 
   
  SELECT * CUSTNUB2 FROM SPECINSTR WHERE UNITLIST LIKE 'Y%'

   You will notice that is gives you all CustNumb2 where unitlist like
'Y' that is where the "To many rows returned" occurs.

Buddy

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Steve
Breen
Sent: Sunday, November 09, 2008 6:15 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: I do not have it right yet, do I ?

Claudine,


This is my problem.

I get this result every time.

R>RUN A110808T
-ERROR-  Too many rows returned (2441)
 Switching input back to keyboard

The criteria the needs to be meant is the .vthis_custnub2 must =
custnub2 in specinstr and unitlist in specinstr must = 'Y' or 'N'

Can't get past this returning to may rows. Should return only one.
Custnub2 is unique in specinstr.

Thanks

Steve


 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Claudine
Robbins
Sent: Sunday, November 09, 2008 12:41 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: I do not have it right yet, do I ?

Steve,

Try this:

SET VAR V1 INTEGER = NULL
SELECT CUSTNUB2 INTO V1 INDICATOR IV1 FROM SPECINSTR WHERE UNITLIST LIKE
'Y%'

IF V1 = .VTHIS_CUSTNUB2 THEN
SET VAR VCHECK_LIST = 'TEST1'
ENDIF

SET VAR V2 INTEGER = NULL
SELECT CUSTNUB2 INTO V2 INDICATOR IV2 FROM SPECINSTR WHERE UNITLIST LIKE
'N%'

IF V2 = .VTHIS_CUSTNUB2 THEN
SET VAR VCHECK_LIST = 'TEST2'
ENDIF

Claudine
________________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Steve
Breen
Sent: Saturday, November 08, 2008 10:05 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - I do not have it right yet, do I ?

-- test command A100808T
-- Set variable vCheck_List
-- Used to remind a user to Check A Spread Sheet for Customer Equipment
Verifcation
-- Major Assumption - var This_CustNub2 is set on form entry
-- This is being used as a entry - exit eep Clear var vCheck_List if
.vthis_custnub2 = custnub2 in specinstr and UnitList like 'Y' then set
var vCheck_List = 'test1'
if .vthis_custnub2 = custnub2 in specinstr and UnitList like 'N' then
set var vCheck_List = 'test2'
endif


Reply via email to