Hi,
I have a requirement to read oracle date. From the source table i need to filter the data on a Date basis. In the proc sql I need to write a where clause like 'compensationdate>='1-Mar-2010' and compensationdate<='31-Mar-2010' '.
Here I converted the date to SAS date and wrote the condition like
'compensationdate>='1-Mar-2010'd and compensationdate<='31-Mar-2010'd.
But I have a reuirement to decide the second date dynamically. For the purpose I used the intnx('month','1-Mar-2010'd,0,'E') which supposed to return a SAS date equivalent to '31-Mar-2010'd. It returns it correctly, the numeric equivalent of '31-Mar-2010'd.
But the condition doesnt work fine.
compensationdate>='1-Mar-2010'd and compensationdate<='31-Mar-2010'd is working fine. But compensationdate>='1-Mar-2010'd and compensationdate<=intnx('month','1-Mar-2010'd,0,'E') is not working fine.
Is not '31-Mar-2010'd equal to intnx('month','1-Mar-2010'd,0,'E') ???
Whate ever the function we are using which rerturns a SAS date coudn't be compared with an oracle date.
Please help me.
Thanks in advance.