BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello,

I am new to SAS. Is there a way to drop a database table without using SAS SQL PROC? For example, the following code snippet only deletes content from the database table but not drops the table altogether right?

sqltest ODBC uid=&sql_user pwd=&sql_pass dsn=ermll;

data test;
x='a'; y=1; output;
x='b'; y=2; output;
x='c'; y=3; output;
x='d'; y=4; output;
x='e'; y=5; output;
x='f'; y=6; output;
x='g'; y=7; output;
x='h'; y=8; output;
run;
proc print data=test; run;

/***Load Data***/
proc delete data=sqltest.test; run;
data sqltest.test;
set test;
run;

Thank you!
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Regarding "..drop a database table.." -- presume this means a SAS database table or SAS data set or a SAS data library member. Yes - check PROC DATASETS.

Scott Barry
SBBWorks, Inc.

Recommended Google advanced search argument, this topic/post:

delete sas table site:sas.com
deleted_user
Not applicable
What I meant to say is I want to drop a oracle database table from SAS without using PROC SQL, not just to clear everything from that table. Is there a way to do that?
Flip
Fluorite | Level 6
Look into SQL passthrough

proq sql;
connect to oracle ....;
execute( drop table xxx) by oracle;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1717 views
  • 0 likes
  • 3 in conversation