Date: Fri, 15 Dec 2006 04:17:57 -0800
Reply-To: jshansen <selchauhansen@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: jshansen <selchauhansen@GMAIL.COM>
Organization: http://groups.google.com
Subject: ODBC to DB2, using CURRENT DATA & CURRENT TIMESTAMP
Content-Type: text/plain; charset="iso-8859-1"
Hi,
I am reading at very large DB2-table with ODBC.
In my SQL I can write dates & timestamps as constants, and it works.
But DB2 does not use the best index.
And the query takes 20-30 minutes.
The constants are created using data _null_ & call symput.
Running the same query from Excel but writing the constants like this:
CURRENT DATE & CURRENT TIMESTAMP, DB2 uses the right index and the same
query takes 5-10 seconds.
It is an "online-application" running under SAS IntrNet.
Is there any chance of using these "DB2 constants" in my SAS-query.
Perhaps a bit like
"connect to DB2 & select * from connection"
Jan Selchau-Hansen
|