Help using Base SAS procedures

Dropping Database Table in SAS

Reply
N/A
Posts: 0

Dropping Database Table in SAS

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!
Super Contributor
Super Contributor
Posts: 3,174

Re: Dropping Database Table in SAS

Posted in reply to deleted_user
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
N/A
Posts: 0

Re: Dropping Database Table in SAS

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?
Super Contributor
Posts: 359

Re: Dropping Database Table in SAS

Posted in reply to deleted_user
Look into SQL passthrough

proq sql;
connect to oracle ....;
execute( drop table xxx) by oracle;
Ask a Question
Discussion stats
  • 3 replies
  • 155 views
  • 0 likes
  • 3 in conversation