BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I am trying to use the describe function in a SQL query that connects to an ODBC database but keep getting error messages. Can someone let me know what the correct syntax is, here is my query:

PROC SQL;
CONNECT TO ODBC (database=XVD user=xxxx using=qhhh);
DESCRIBE TABLE XVD.BSL_HRR_CAPITAL_RISK_F;

quit;
6 REPLIES 6
deleted_user
Not applicable
It would be great if you can share log details...

~ Sukanya E
deleted_user
Not applicable
Hi Sukanya, here is the log, thanks for your help.

214 libname Harris 'H:\Harris\SAS Progs';
NOTE: Libref HARRIS was successfully assigned as follows:
Engine: V9
Physical Name: H:\Harris\SAS Progs
215 /* Dump out the AIRB table into a SAS dataset */
216 PROC SQL;
217 CONNECT TO ODBC (database=HBR user=gxann using=XXXXXXXX);
218 DESCRIBE TABLE HBR.BSL_HRR_CAPITAL_RISK_F;
ERROR: Libname HBR is not assigned.
219
220 quit;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.06 seconds
cpu time 0.03 seconds
deleted_user
Not applicable
The below document provides ODBC connection to various databases using libname and Proc sql. Try it out and let me know still you face the same issue.

http://www.lexjansen.com/wuss/2004/data_warehousing/c_dwdb_using_proc_sql_and_od.pdf


~ Sukanya E
deleted_user
Not applicable
Thanks, I will check it out.
Doc_Duke
Rhodochrosite | Level 12
Bob,

To use the SAS SQL DESCRIBE statement, you have to use the LIBNAME approach to connecting to the remote database. To use the pass-through query, I think that you need to use the SAS EXECUTE statement (assuming DESCRIBE is a valid command in the remote DBMS)..

Doc Muhlbaier
Duke
deleted_user
Not applicable
Thanks , I will check that out.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1761 views
  • 0 likes
  • 2 in conversation