|
Not surprising that SAS functions won't work on DB2. When you execute a
pass-through query, the query is executing completely outside of SAS.
Two alternatives, the first preferable, the second possibly inconveivable if
either of the two joined tables are of any size.
1) Does DB2 have a function that'll replicate what you're doing with INTNX?
2) Create a SAS/Access DB2 libname and execute the query in SAS.
See OnlineDocs for the "SAS/ACCESS LIBNAME Statement: DB2 Specifics"
e.g.
libname mylib db2 ssid=db2 authid=testuser server=testserver;
proc sql;
select a.*, b.*
from mylib.table1 a,
mylib.table2 b
where a.date1=intnx('month',b.date,2,'end')
;
quit;
HOWEVER!!! SAS will pull every row from both tables through the pipe and
weed out the non-conformists on the machine running SAS.
-----Original Message-----
From: Chandu [mailto:mailrajuv@YAHOO.COM]
Sent: January 22, 2004 3:25 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: DB2 date and SAS date
Hi Group,
I am comparing two dates from different tables both are in DB2.But I
am using sas function on one date.
EX:
a.date1=intnx('month',b.date,2,'end')
but this is not working.I am doing this in pass through sql in db2.Can
anyone suggest me a way to do this.
Thanks in advance
Raju
|