BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ElisabettaC
Calcite | Level 5

Hi, 

is it possible to run a delete with where statement in PROC FEDSQL? 

 

I try this code but it doesn't work: 

 

cas mysess sessopts=(caslib=public);

libname libcas cas caslib=public;


proc fedsql sessref=mysess;
delete from public.tab1
where id_operazionale=3679532;
quit;

 

This is the log:

 

 
1 %studio_hide_wrapper;
82 proc fedsql sessref=mysess;
83 delete from public.tab1
84 where id_operazionale=3679532;
ERROR: Unsupported SQL statement.
ERROR: Azione interrotta a causa di errori.
ERROR: The FedSQL action was not successful.
NOTE: PROC FEDSQL has set option NOEXEC and will continue to prepare statements.
85 quit;
NOTE: PROCEDURE FEDSQL ha utilizzato (tempo totale di elaborazione):
real time 0.00 seconds
cpu time 0.01 seconds
 
86
87
88 %studio_hide_wrapper;
99
100

 

 

 

Thanks

ElisabettaC

1 ACCEPTED SOLUTION

Accepted Solutions
BrunoMueller
SAS Super FREQ

Check the doc here https://go.documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=v_007&docsetId=casfedsql&docsetTarget=p...

 

Supported Statements

The following FedSQL statements are supported in CAS:

  • CREATE TABLE, with the AS query expression
  • DROP TABLE
  • SELECT

 

To delete rows in a CAS table use the table.deleteRows CAS action, see here https://go.documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=v_007&docsetId=caspg&docsetTarget=cas-t...

 

Please adjust the doc to the version you are using:

 

selectDoc.png

View solution in original post

1 REPLY 1
BrunoMueller
SAS Super FREQ

Check the doc here https://go.documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=v_007&docsetId=casfedsql&docsetTarget=p...

 

Supported Statements

The following FedSQL statements are supported in CAS:

  • CREATE TABLE, with the AS query expression
  • DROP TABLE
  • SELECT

 

To delete rows in a CAS table use the table.deleteRows CAS action, see here https://go.documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=v_007&docsetId=caspg&docsetTarget=cas-t...

 

Please adjust the doc to the version you are using:

 

selectDoc.png

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Discussion stats
  • 1 reply
  • 1649 views
  • 1 like
  • 2 in conversation