Help using Base SAS procedures

PROC SQL: Verify before executing whether a query may run fully in-database

Reply
Occasional Contributor
Posts: 17

PROC SQL: Verify before executing whether a query may run fully in-database

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.

Respected Advisor
Posts: 4,920

Re: PROC SQL: Verify before executing whether a query may run fully in-database

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

PG

PG
Occasional Contributor
Posts: 17

Re: PROC SQL: Verify before executing whether a query may run fully in-database

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.

Ask a Question
Discussion stats
  • 2 replies
  • 248 views
  • 0 likes
  • 2 in conversation