f



Can proc sql read raw data from a big text file?

Because I have a SQL codes provided for SQL server to read such data. 
I couldn't find any example that proc sql can read raw data from a
file.
Thank you for your answer.
Andrew
0
8/30/2004 1:31:48 AM
comp.soft-sys.sas 141241 articles. 1 followers. Post Follow

3 Replies
500 Views

Similar Articles

[PageSpeed] 46

Andrew,

No, it cannot. The only "proc" capable of reading raw data from a text file
(regardless of size) is the Data step. The only exceptions are raw text
files with a predetermined structure, such as CSV files.

Kind regards,
----------------
Paul M. Dorfman
Jacksonville, FL
----------------

> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On
> Behalf Of Andrew Yu
> Sent: Sunday, August 29, 2004 9:32 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Can proc sql read raw data from a big text file?
>
> Because I have a SQL codes provided for SQL server to read such data.
> I couldn't find any example that proc sql can read raw data
> from a file.
> Thank you for your answer.
> Andrew
>
0
sashole (972)
8/30/2004 5:14:27 AM
Andrew:
Paul has answered your question. I would add that you can use a Data step
view to stream data through a SAS SQL WHERE clause. In a quick sketch,
data tempVW/view=tempVW;
  input v1....
run;
proc sql;
  create table tempFiltered as
  select v1,v2,.... from tempVW
  where .....
  ;
quit;

I see the Data step INPUT statement as a very powerful preprocessor for SAS
SQL. The INPUT methods for system files span the major platforms. The
SAS/ACCESS engines for RDBMS's combine with the INPUT features to make SAS
SQL far more versatile than other SQL dialects.
Sig
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Andrew
Yu
Sent: Sunday, August 29, 2004 9:32 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Can proc sql read raw data from a big text file?


Because I have a SQL codes provided for SQL server to read such data. I
couldn't find any example that proc sql can read raw data from a file. Thank
you for your answer. Andrew
0
HERMANS1 (2684)
8/30/2004 2:31:21 PM
Could you perhaps construct some macro statements in the from statement to
achieve the same result of a separate datastep to read the data? You can of
course use the *connection to* syntax although that is only for data
already in another DBMS, ie not necessarily raw text,

HTH.

On Mon, 30 Aug 2004 10:31:21 -0400, Sigurd Hermansen <HERMANS1@WESTAT.COM>
wrote:

>Andrew:
>Paul has answered your question. I would add that you can use a Data step
>view to stream data through a SAS SQL WHERE clause. In a quick sketch,
>data tempVW/view=tempVW;
>  input v1....
>run;
>proc sql;
>  create table tempFiltered as
>  select v1,v2,.... from tempVW
>  where .....
>  ;
>quit;
>
>I see the Data step INPUT statement as a very powerful preprocessor for SAS
>SQL. The INPUT methods for system files span the major platforms. The
>SAS/ACCESS engines for RDBMS's combine with the INPUT features to make SAS
>SQL far more versatile than other SQL dialects.
>Sig
>-----Original Message-----
>From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Andrew
>Yu
>Sent: Sunday, August 29, 2004 9:32 PM
>To: SAS-L@LISTSERV.UGA.EDU
>Subject: Can proc sql read raw data from a big text file?
>
>
>Because I have a SQL codes provided for SQL server to read such data. I
>couldn't find any example that proc sql can read raw data from a file.
Thank
>you for your answer. Andrew
0
ben.powell1 (971)
8/31/2004 9:14:06 AM
Reply: