SQL - PASS through facility - SAS

Can anyone please help me on this

1. when we are using SQL pass through facility can we create a view or update a table directly in the database we are connecting to if so Can you plz help me on that.

2. Consider a situation where i have created a permenant SAS dataset using SQL pass through facility and then next time i need to update the same dataset with new columns and data flowing from the query of tera data


can i write as

create table
update table
(select * -query)

thanks in advance
Who is Participating?
Aloysius LowCommented:
not possible unless you
1. create the new column in your target table first
2. write your update statement to include the new column and the joining condition to update the new column with the values.

chances are, re-doing the table is going to be easier both on yourself and the server.

again, i stand corrected
Aloysius LowCommented:
for #1, I have not tried it before, but i'd think it's possible and something along the lines of
proc sql;
  connect to [dbms name] as [alias] (user=[username] pw=[password] path='[path]');
  execute (SQL query to be understood by the database) by [alias];
  disconnect from [alias];

for #2, i'm have not used tera data queries before, not too sure how things work.
arukuAuthor Commented:
thanks but I just want to know if we can update the same data set the next time whatever may be the SQL
Aloysius LowCommented:
well i don't see why not, but I may be wrong...
arukuAuthor Commented:
To be more clear.

I have first created a sas dataset arun.a from the sql pass through facility and the next time i don't want to run the whole query again and hit the database but i just want to update a column from the data base into my dataset then can i use a

update arun.a as ( select ac from b );

and the new column of ac gets updated in my dataset insted of running the whole query again

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.