Tagged Questions

3
votes
1answer
24 views

How to check SQL queries generated by SAS/ACCESS ?

I wonder if there is any possibility to see SQL queries generated by SAS enviroment on connection with relation database (ORACLE) ? I would like to use ordinal DATA STEP instead of …
2
votes
2answers
36 views

Joining views with indexes in proc SQL

Hi All I have two views, app, and app_status. Each view simply concatenates monthly datasets like so: create view app as select * from app_200901 outer union corresponding sel …
1
vote
1answer
55 views

problems with datepart() and proc sql

I am getting two different results from what to me look like identical queries. The second query returns fewer rows. The only thing different is the use of datepart(). Any ideas …
1
vote
3answers
202 views

conditional insert with proc sql

Is it possible to do a conditional insert with PROC SQL? I'm trying to do something like: proc sql; insert into work.test set a=1, b=2 where not exists (selec …
3
votes
3answers
274 views

Using SAS Base to Import Data from tables in SQL Server using ODBC?

I am again learning to use SAS after working in Stata, R, and SPSS, along with SQL Server, etc. Without having to pay an expensive add-on using SAS/ACCESS interface to ODBC or P …
1
vote
2answers
22 views

masking reserved in proc sql

I'm getting an error using proc sql because one of the variable/field names, i.e. "desc", on the database I'm querying is apparently a reserved word in either proc sql, the dbms or …
1
vote
1answer
79 views

Subquery with Proc SQL?

I have the following data set. I am writing two separate SQL steps to count the subjects with different conditions. Is there way to combine both the queries into one using SQL …