| 
 | 
楼主
 
 
 楼主 |
发表于 2004-7-13 12:36:21
|
只看该作者
 
 
 
Something strange, is there any one can help?
I am trying to get the transaction information of certain period from data warehouse. In order to make it more efficient, I wrote a macro as 
  
  
%macro RFM /store; 
libname out "&directory"; 
data RFM (keep= account_key customer_key merchant_key txn_key txn_date txn_date_key  
                txn_amount); 
  set dwh.central_card_sale_fact; 
  txn_date=datepart(txn_date_key); 
  where txn_key in (1,2,5,6,7,8,9,10,11,12,13,14,72,73,74,75,84,85,86,87,88,89,90, 
                    91,92,93,95,96,97,98,1010,1014) 
  and txn_amount not in (.) 
  and account_key not in (.) 
  and merchant_key not in (.) 
  and &start<=datepart(txn_date_key)<=&end; 
run; 
*........... other coding ....... *; 
%mend; 
%let diretory=D:\; 
%let start='01Oct2002'd; 
%let end='31Dec2002'd; 
%Rfm; 
  
The strange thing is after I run the whole code, I found all transaction information available in the datawarehouse is captured by data RFM, not just the period I need. Any one can tell me why this happens? Thanks a lot! 
  
Hanna |   
 
 
 
 |