01-30-2015 04:42 AM
SAS uses ANSI 92 SQL, which means that only one table for each CREATE TABLE statement.
Number of tables created within a single PROC SQL; QUIT; block is unlimited...
01-30-2015 05:00 AM
i try to create around 50 tables with in proc sql and each table i am generating sequentical numbers by using monotonic() then i got some problem means
dataset1 i am generating seq numbers based on one variable it gives seq values like 1 2 3
dataset2 - seq numbers 1 2 3
dataset3 - seq numbers start with 2nd dataset last number that is 4 5 6 ...
why i am getting this problem??
if i create one sql block with dataset1 & dataset 2 and another proc sql block with dataset3 & dataset4 then i am not getting any problem..
pls help me out from this problem!
01-30-2015 05:05 AM
First, monotonic() is unsupported, not (yet?) intended for production jobs.
Monotonic() numbers records in each statement. So with a new select it start over from 1. Much like _n_ in the data step.
Why do you want to create 50 different datasets, and have them numbered? Are they from the same source table? If so, the data step might be a better tool for you.
01-30-2015 05:36 AM
i am formating the results based on display, if any subject coming to perticular group then i have to create that recored with null values that the reason i am creating dummy record datasets.
if i use datasetp the code will be more then i started first time with proc sql; then i faced this problem!
i hope now you got i am doing!
01-30-2015 06:14 AM
Sorry, don't follow you.
Since this seems to be a new question, open a new thread.
In that, attach your code so far, sample input data, and desired output data.
01-30-2015 06:26 AM
Yes, I am not following either. Perhaps some test data/required output would clarify. I would also mention that I believe there are limitations to how many tables can be used in one SQL block.