I am using a pass through connection to sql server. I am attempting to translate from a pass through connection to hadoop. Can anyone look a the code below and see if this looks correct. The normal way I use the pass through to sql server isn't working due to an extra open parenthesis, but when I remove it I still get an error. The open parens prior to select distinct, as well as the open parens in front of WITH are the issue. If I add another close parens at the end it errors.
proc sql;
connect to sqlsvr (dsn=chsrproddb &_log_host);
CREATE TABLE FullData AS
SELECT * FROM CONNECTION TO sqlsvr
(select distinct
(WITH this_srvc_auth AS
( SELECT
Everything between the () in a statement like:
select * from connection to XXX ( .... ) ;
has to be valid syntax on the database that the connection named XXX is pointing to.
If you have a HADOOP question perhaps you should ask it on a HADOOP forum?
It would help if you posted your complete Passthru query. Then we might understand what it is trying to do and be able to offer more helpful advice. In my experience SQL dialects don't necessarily translate well because of custom additions like the one you have found.
1. Have your query work in a SQL Server interface (e.g., SQL Server Management Studio).
2. Attach thew full log in you post.
Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.