Help using Base SAS procedures

Using describe function in Proc SQL

Reply
N/A
Posts: 0

Using describe function in Proc SQL

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;
N/A
Posts: 0

Re: Using describe function in Proc SQL

It would be great if you can share log details...

~ Sukanya E
N/A
Posts: 0

Re: Using describe function in Proc SQL

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
N/A
Posts: 0

Re: Using describe function in Proc SQL

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
N/A
Posts: 0

Re: Using describe function in Proc SQL

Thanks, I will check it out.
Trusted Advisor
Posts: 2,113

Re: Using describe function in Proc SQL

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
N/A
Posts: 0

Re: Using describe function in Proc SQL

Thanks , I will check that out.
Ask a Question
Discussion stats
  • 6 replies
  • 255 views
  • 0 likes
  • 2 in conversation