BookmarkSubscribeRSS Feed
Halaku
Obsidian | Level 7
I need to find a method to truncate bunch of tables in Oracle. Is there a transformation available to do that?

Thanks,

MI
4 REPLIES 4
LinusH
Tourmaline | Level 20
If you are looking for a single transformation that truncates many tables, there is none.
I suggest that you crate a User Written Transformation to do this, which is quite simple (I have done one for SPD Server once). Use macro lopping over the input tables to the transformation which you would like to truncate

/Linus
Data never sleeps
Patrick
Opal | Level 21
Hi Linus
Agree with Oracle. With SPDS the table loader in DIS4.2 actually allows truncation so one could also implement this using a loop.
nar_sas
SAS Employee
The general table loader also supports the truncate behavior in 4.2 for most databases. You can also try that approach, and the Loop idea is a good suggestion to manage this for multiple tables.
Halaku
Obsidian | Level 7
Thanks folks for the reply.

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!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1345 views
  • 0 likes
  • 4 in conversation