I have a process that inserts data into a permanent table, after the insert, the permanent table has to be sorted. The should run about once a month.
I wrote a create table statement where the source and destination are the same permanent table and get the following error: "This CREATE TABLE statement recursively references the target table. A consequence of this is a possible data integrity problem."
I googled it and found there's an option to disable the warning, but I'm wondering if it's bad practice to leave it like this, and if so, how do I write the program so as to not risk data integirty.
Thanks in advance.
insert into perm_table
select * from source;
create table perm_table as
select * from perm_table
order by id;
No, I forget to use other procs sometimes because I'm more familiarized with sql.
SAS INNOVATE 2024
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.