BookmarkSubscribeRSS Feed
LM2022
Calcite | Level 5

Good morning, 

I am sure this is a simple problem but I can't seem to find an answer online. I am trying to query an SQL database that contains some protected columns (like a confidential phone number). When I use Proc SQL specifying the variables I want, none of which are protected, I get a describe error. Code and error below:

55 proc sql;
56 create table xx1 as
57 select userID, fname, lname, 
57 ! email1, mailaddr
58 from OPSDB.useraccount;
ERROR: Describe error: IColumnsInfo::GetColumnInfo failed. : Deferred prepare could not be
completed.: The SELECT permission was denied on the column 'PHONENUM' of the object
'USERACCOUNT', database 'USERDB', schema 'dbo'.
59 quit;

 

Any thoughts? Thanks in advance. 

1 REPLY 1
SASKiwi
PROC Star

Try an SQL Passthrough query to see if you get the same problem:

proc sql;
connect using OPSDB;
create table xx1 as
select * from connection to OPSDB
(select userID, fname, lname, 
email1, mailaddr
from useraccount
);
quit;

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 451 views
  • 0 likes
  • 2 in conversation