David:
 
Thanks so much to you, Mr. Bentley and Mr. Downall for this enlightening
solution.  It works as described . . . of course!  I don't understand why it
has to work that way when CROSSTAB and other commands worked with my initial
approach.
 
Bill D. suggested that the hyphens in the variable (i.e. 435-10) were
problematic.  I can confirm that they were.  I used the same technique but
with a different column (INVC_NO TEXT 6) that has no hyphens and the TALLY
command worked as originally intended.
 
SET VAR VTPR_MELT = '105482,105483,105484,105568,105569,105683'
 
R>TALLY ITEM_NO FROM SHIPMAST WHERE SHIPDATE BETWEEN 1/1/2008 AND 12/15/2009
AND INVC_NO IN ( &VTPR_MELT ) AND SX_FLAG = 'SHIP'
ITEM_NO           Number of Occurrences
----------------- ---------------------
     145019           11 
     152000            5 
     152409           20 
     152410           22 
     154966            4 
     178466           58 

The variable was not created with the parens included.  However, it is
apparent that the most reliable technique is to create the variable with the
parens included.
 
Thanks to everyone who helped with this.  This is a good day since I learned
something new.
 
Mike Ramsour
  _____  

From: David Blocker [mailto:[email protected]] 
Sent: Thursday, December 17, 2009 10:21 AM
To: [email protected]
Subject: [RBASE-L] - Re: TALLY behavior


Mike

You have to create a variable that includes the parens to use it with IN:

SET VAR VTPR_MELT TEXT = '(435-10,436-11)'

Then the command is:


TALLY ITEM_NO FROM SHIPMAST WHERE SHIPDATE BETWEEN 1/1/2009 AND 12/15/2009
AND MELTCODE IN &VTPR_MELT AND SX_FLAG = 'SHIP'
 
David


"David Blocker 
[email protected] 
Office: 781-344-1920 
Cell: 339-206-0261" 
 


Confidentiality Notice
This message is intended exclusively for the individual or entity to which it 
is 
addressed and may contain privileged, proprietary, or otherwise private 
information.  
If you are not the named addressee, you are not authorized to read, print, 
retain, 
copy or disseminate this message or any part of it.  If you have received this 
message in error, please notify the sender immediately by e-mail and delete all 
copies of the message.

Reply via email to