Date: Tue, 3 Apr 2007 16:41:17 +0000
Reply-To: toby dunn <tobydunn@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: toby dunn <tobydunn@HOTMAIL.COM>
Subject: Re: proc sql pass-thru and format option
In-Reply-To: <1175618017.942322.172860@d57g2000hsg.googlegroups.com>
Content-Type: text/plain; format=flowed
Been a long time since I had to play with a DB2 but try:
Proc SQL ;
Connect To DB2 ( DataBase = XXXXX Ril = UR ) ;
Create Table Lib1.Table As
Select A , B , C Format = Date9.
From Connection To DB2
( Select A , B , C
From TableName )
Order By A , B , C ;
Quit ;
Toby Dunn
To sensible men, every day is a day of reckoning. ~John W. Gardner
The important thing is this: To be able at any moment to sacrifice that
which we are for what we could become. ~Charles DuBois
Don't get your knickers in a knot. Nothing is solved and it just makes you
walk funny. ~Kathryn Carpenter
From: azaufan <azaufan@GMAIL.COM>
Reply-To: azaufan <azaufan@GMAIL.COM>
To: SAS-L@LISTSERV.UGA.EDU
Subject: proc sql pass-thru and format option
Date: Tue, 3 Apr 2007 09:33:37 -0700
I'm using proc sql to connect to db2 and want to apply a date format
to a created column ...below is the example...DB2 doesn't seem to like
the format option no matter where i put it. Can this be fixed?
EXAMPLE 1:
proc sql;
connect to db2 (database=XXXXX ril=ur);
create table lib1.table as
select *
from connection to db2
(select a,
b,
c (format date9.)
from tablename
group by a,b,c
order by a,b,c
);
quit;
run;
OR
proc sql;
connect to db2 (database=XXXXX ril=ur);
create table lib1.table (c format=date9.) as
select *
from connection to db2
(select a,
b,
c
from tablename
group by a,b,c
order by a,b,c
);
quit;
run;
_________________________________________________________________
Exercise your brain! Try Flexicon.
http://games.msn.com/en/flexicon/default.htm?icid=flexicon_hmemailtaglineapril07