LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2004, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 22 Jan 2004 15:57:08 -0500
Reply-To:   "Droogendyk, Harry" <Harry.Droogendyk@CIBC.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Droogendyk, Harry" <Harry.Droogendyk@CIBC.COM>
Subject:   Re: DB2 date and SAS date
Content-Type:   text/plain; charset="iso-8859-1"

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


Back to: Top of message | Previous page | Main SAS-L page