BookmarkSubscribeRSS Feed
Obsidian | Level 7

Hi all

Is there any way to verify before executing whether a PROC SQL query may run fully in-database? ex: LIBNAME DB2

I'd like to reduce data movement/translation and leverage PROC SQL's use of the Pass-Through Facility but if the database itself cannot process the query than I'd like to avoid PROC SQL from processing any portion of the query itself. Also, is it possible to copy to the log PROC SQL's translated query destined for the pass-through facility? (i.e. describe w/o executing) This may help when translating SQL syntax across different DBMS.

Thanks for your help in advance.

Opal | Level 21

When you use Proc Sql Pass-Through Facility, Proc SQL does NOT handle "any portion of the query itself". 


Obsidian | Level 7

Thanks PG. Agreed. Sorry, I misstated my question. I'd like to leverage implicit libname rather than explicit pass-through. With explicit pass-through, if a similar query is being run across two or more different DBMS, the query syntax may need to be manually translated (or dynamically translated through macros). In general, it would nice for others to interpret or maintain a single (and maybe simpler) syntax. I shouldn't have suggested that implicit libname generates explicit pass-through code. However, if implicit libname does generate the proper explicit syntax behind the scenes, I'd like to export that translation to the log.



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg



Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 2 in conversation