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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 1466 views
  • 0 likes
  • 3 in conversation