- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
Need help in below query. I am trying to create a macro in pass through query
proc sql;
connect to POSTGRES as ab(user="xxxx" password="abcde" );
select dim_cnt into :dimcnt from connection to ab
(select count(dimcnt) as dim_cnt from lib.tab);
disconnect from ef;
quit;
%put &dimcnt;
library connection worked but getting syntax error like below. Please help me in resolving this query
ERROR 79-322: Expecting a (.
84 disconnect from ef;
----------------------------------------------------
217
ERROR 217-322: Invalid statement due to first character being unprintable (hexadecimal representation:
C2A0C2A0C2A0C2A0C2A0C2A0C2A0C2A0C2A0C2A0C2A0C2A0C2A0C2A0C2A0C2A0C2A0C2A0C2A0C2A0C2A0C2A0C2A0C2A0C2A0C2A0).
85 quit;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Unprintable character might be something that you didn't see when copy/paste from another document.
I would try deleting everything on the line before the "disconnect from ef;" If you still that error then delete everything to the semicolon on the previous line in case the offensive character(s) are appearing at the end of that line as well.
As may have been pointed out previously, the main message windows on this forum reformat text. So if you want us to actually see what was in your code or your log you need to open a text box using the </> icon above the message window and paste the text.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Please show us the ENTIRE log for this PROC SQL. Please copy the log as text and paste it into the window that appears when you click on the </> icon.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Try removing your DISCONNECT statement. Looks like it contains an unprintable character typo. SAS will disconnect automatically with the QUIT statement anyway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Unprintable character might be something that you didn't see when copy/paste from another document.
I would try deleting everything on the line before the "disconnect from ef;" If you still that error then delete everything to the semicolon on the previous line in case the offensive character(s) are appearing at the end of that line as well.
As may have been pointed out previously, the main message windows on this forum reformat text. So if you want us to actually see what was in your code or your log you need to open a text box using the </> icon above the message window and paste the text.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
'A0'x is a "non-breaking" space.
'C2A0'x is the same character in UTF-8 encoding.
Replace them with actual spaces instead. And actual space is '20'x .
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content