LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2001, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 26 Feb 2001 09:08:56 GMT
Reply-To:     grueninger@ibgrueninger.de
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Andreas Grueninger <grueninger@IBGRUENINGER.DE>
Organization: Ingenieurbuero Grueninger
Subject:      Re: SQL Dilemma
Content-Type: text/plain; charset=ISO-8859-1

Dear Jacinto,

Please post your error logs. Otherwise it is too much speculation about the real errors.

I speculate you want to combine results of a bootstrapping process. And the method to prdouce the layout of your desired final result table is that what old fashioned SAS users would name as INTERLEAVING and not as JOINING. The main difference is that INTERLEAVING does not combine records of two or more tables in ONE record of the output table but appends the records. And this is very efficiently done with PROC APPEND. Especially in bootstrapping is this of great importance concerning the overall runtime.

Before the starting the bootstrapping you create an empty table, with SQL or a DATA STEP. Let us name it 'resultsFinal'.

* start of bootstrapping ;

* In the bootstrapping you make your calculations and create a table with the same structure like 'resultsFinal' with your SQL statement ==> your SQL statement ;

create table resultsRound as select row_main, dur_rec as row_number, sum(empl_1924)/1069 as pct_19_24 format=percent6., sum(emp_718)/560 as pct_7_18 format=percent6., sum(employ1924)+sum(emp_718) as curr_employ, (calculated curr_employ/1924) as pct_7_24 format=percent6., from labour1 group by row_main; * or for hardcore SQL freaks, remove the following PROC APPEND if you use this one ; * INSERT INTO resultsFinal SELECT * FROM resultsRound; QUIT;

PROC APPEND BASE=resultsFinal DATA=resultsRound; RUN;

* end of this round ;

>producing the desired output (any ideas would be great! ... Please >Help!). Here's the tentative syntax of the program (for one table which

* --------------------------------- + ! Ingenieurbuero Grueninger ! ! Andreas Grueninger ! ! Uhlbergstr. 15 ! ! 72631 Aichtal (Germany) ! ! email: grueninger@ibgrueninger.de ! + --------------------------------- ;


Back to: Top of message | Previous page | Main SAS-L page