BookmarkSubscribeRSS Feed
0 Likes

I'm fairly consistent with how I set up my SQL joins and for some reason the auto-complete on the from line below, will expand to AS BETWEEN. I'm ending the line on AS B but the enter key always completes BETWEEN. I'm wondering if it would be possible to make an exception to the auto-complete in this common scenario and not have B autocomplete to BETWEEN. This is more of an annoyance but I could imagine how many folks are having the same issue. 

 

PROC SQL;
CREATE TABLE	CM_STATS_JOIN
AS SELECT		A.*, B.CN AS TOTAL_CM
FROM			SW_STATS AS A LEFT JOIN CM_COMBINED AS B
				ON A.'PUBLIC HEALTH REGION'N=B.REGION;
QUIT;
3 Comments
Rick_SAS
SAS Super FREQ

The autocomplete functionality merely looks up keywords in the grammar and suggests possible completions. When you type
AS B
it suggests BETWEEN, but if you were to type

AS C 

it would suggest different keywords (CASE, CHECK, CONTAINS,....).

 

Assuming that you do not want to turn off the autocomplete feature, I suggest you press the ESC key to dismiss the autocomplete suggestion.

 

Another suggestion is to use X and Y (and Z) as table names, since there are no SQL keywords that begin with those letters:

PROC SQL;
CREATE TABLE   CM_STATS_JOIN
AS SELECT      X.*, Y.CN AS TOTAL_CM
FROM        SW_STATS AS X LEFT JOIN CM_COMBINED AS Y
            ON X.'PUBLIC HEALTH REGION'N=Y.REGION;
QUIT;
CAKSTX
Fluorite | Level 6

Thanks, I've switched to using X and Y and that has solved the problem. 

RonAgresta
SAS Employee
Status changed to: Suggestion Closed

Customer has solved the problem.