Help using Base SAS procedures

Proc Sql - How Many tables can create

Reply
Contributor
Posts: 44

Proc Sql - How Many tables can create

Hi all,

i have one doubt, within single block of sql -  how many tables we can create?

Best Regards,

Hima

Super User
Posts: 5,430

Re: Proc Sql - How tables can create

Posted in reply to HimaAalamuri

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...

Data never sleeps
Contributor
Posts: 44

Re: Proc Sql - How tables can create

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!

Super User
Posts: 5,430

Re: Proc Sql - How tables can create

Posted in reply to HimaAalamuri

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.

Data never sleeps
Contributor
Posts: 44

Re: Proc Sql - How tables can create

i am creating these tables for dummy records creation for each sub group

Thanx,

Hima

Super User
Posts: 5,430

Re: Proc Sql - How tables can create

Posted in reply to HimaAalamuri

I don't really get what you are doing. But if you are happy, I'm happy Smiley Happy

Data never sleeps
Contributor
Posts: 44

Re: Proc Sql - How tables can create

thank you!

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!

Thans,

Hima

Contributor
Posts: 44

Re: Proc Sql - How tables can create

Posted in reply to HimaAalamuri

and one more thing Linus, do have any idea how to compare two output window results by using any sas procedure..

Best regards,

Hima

Super User
Posts: 5,430

Re: Proc Sql - How tables can create

Posted in reply to HimaAalamuri

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.

Data never sleeps
Super User
Super User
Posts: 7,968

Re: Proc Sql - How tables can create

Posted in reply to HimaAalamuri

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. 

Ask a Question
Discussion stats
  • 9 replies
  • 277 views
  • 2 likes
  • 3 in conversation