Showing posts with label Useful Tips. Show all posts
Showing posts with label Useful Tips. Show all posts

Friday, April 1, 2011

SQL Pass through For SQL Server without entering Password

proc sql ; connect to odbc(dsn=CMIS AUTHDOMAIN="SQL Server Login Domain"); create table Sample as select * from connection to odbc ( Your T- SQL Staments, Calls to Stored Procedures Goes here ); DISCONNECT FROM ODBC; QUIT;

Wednesday, December 1, 2010

5 Ways to Secure your Passwords in SAS

I always wondered if there is a better way to secure a password in a SAS Program other than the Proc Pwencode procedure which Encrtyps the password in the program, However any user though not knowing your password can actually run your program and obtain the results, all that the Proc Pwencode does is to protect your password from others looking over your shoulder.

Off late I came across a SAS Blog that gives us 5 ways to secure/eliminate the password(Including the Pwencode), Quiet Interesting Ain't it??

http://blogs.sas.com/sasdummy/index.php?/archives/222-Five-strategies-to-eliminate-passwords-from-your-SAS-programs.html

Tuesday, November 30, 2010

Proc SQL Feedback Option

The Feedback option in Proc SQL, puts the expanded or Transformed verion of the query to the log window, this can be quiet handy and can be compared to the Macro debugging options.

Here is an example :
Program:
proc sql feedback;
select * from temp
group by post having count( distinct code ) ge 2 ;
quit;

Here is the log:
proc sql feedback;
16 select * from temp
17 group by post having count( distinct code ) ge 2 ;
NOTE: Statement transforms to:
select TEMP.post, TEMP.code
from WORK.TEMP
group by TEMP.post
having COUNT(distinct TEMP.code) >= 2;