f



Re: Deleting SAS Data from a SAS DATASET #19

On Mon, 18 Aug 2008 10:26:14 -0400, SUBSCRIBE SAS-L Chandra Gadde
<ddraj2015@GMAIL.COM> wrote:

>When I used this code, I am receiving the following warning. It completely
>deleted my prod.master_date SAS Dataset. Do you know what is going on here?
>
>WARNING: This SAS global statement is not supported in PROC SQL. It has
>been ignored.

In PROC SQL, WHERE must be a clause within a statement, not a freestanding
statement. Get rid of the semicolon immediately before the word "where".

Incidentally, I think the warning is inaccurate in referring to a WHERE
statement as a global statement.

>
>
>
>On Fri, 15 Aug 2008 13:17:25 -0500, Mary <mlhoward@AVALON.NET> wrote:
>
>>One thing you might do is to add an index on the snap_dt to the dataset;
>if that's there then you should be able to delete the records in place:
>>
>>proc sql;
>>   delete from prod.master_date;
>>  where snap_dt = "&end_dt"d;
>>quit;
>>run;
>>
>>In both the ways you  are trying now you are creating new data sets rather
>than deleting records from the current data set; it would seem to me that a
>SQL delete statement would be faster than creating new datasets even if
>there isn't an index on the date.
>>
>>-Mary
>>  ----- Original Message -----
>>  From: SUBSCRIBE SAS-L Chandra Gadde
>>  To: SAS-L@LISTSERV.UGA.EDU
>>  Sent: Friday, August 15, 2008 12:14 PM
>>  Subject: Deleting SAS Data from a SAS DATASET
>>
>>
>>  Hi All
>>
>>  I have several SAS datasets that are very very big. (50GB of size). Every
>>  month, the data is being appended to these datasets. I need to deleted
>the
>>  data which is greater than 24 months. What is the best method to do this?
>>  Please help me.
>>
>>  I tried PROC SQS and DATA STEP. But these two are taking very long time.
>>
>>  Data prod.Master_data;
>>    set prod.master_date;
>>    if snap_dt = "&end_dt"d then delete;
>>  run;
>>
>>  proc sql;
>>  crete table prod.master_date from prod.master_date
>>  where snap_dt ne "&end_dt"d;
>>  quit;
0
hs
8/18/2008 3:38:07 PM
comp.soft-sys.sas 142827 articles. 4 followers. Post Follow

0 Replies
954 Views

Similar Articles

[PageSpeed] 11

Reply: