| Date: | Fri, 16 Jul 2010 20:49:34 -0500 |
| Reply-To: | Craig Johnson <cjohns38@GMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Craig Johnson <cjohns38@GMAIL.COM> |
| Subject: | Re: Character Date Conversion in PROC SQL |
|
| In-Reply-To: | <AANLkTimmu8VE_TSmzSdBrOct8wxvthTU44nS1avBSWMe@mail.gmail.com> |
| Content-Type: | text/plain; charset=ISO-8859-1 |
|---|
My newness is showing! I'm connecting through a libname using an OLEDB
connection.
On Fri, Jul 16, 2010 at 5:00 PM, Joe Matise <snoopy369@gmail.com> wrote:
> Bit more detail - are you running just PROC SQL not connecting to anything
> (using LIBNAME access, basically), or is this passthrough to a server (using
> CONNECT TO)?
>
> If it's just PROC SQL not connected to anything, then INPUT will work
> fine. But if it's passthrough, you either need to do it in the first part
> of the passthrough:
>
> proc sql; connect to ... ;
> create table A as select a,b,c,input(d,'mm/dd/yyyy') as d from connection
> to ... ( select * from whatever);
> quit;
>
> or you need to use your local database's terminology inside the connection
> to ... statement (cast, to_num, etc.).
>
> -Joe
>
>
> On Fri, Jul 16, 2010 at 4:54 PM, Craig Johnson <cjohns38@gmail.com> wrote:
>
>> I need to convert some dates stored in a database (10-10-2010 and
>> 10/10/2010) from character fields to numeric fields. What's the best way
>> to
>> go about this in PROC SQL?
>>
>
>
|