Skip to content

Conversation

@yoavcloud
Copy link
Contributor

When parsing a SQL that doesn't use semicolon delimiters, for example:

SELECT col FROM tbl
IF x=1
  SELECT 1
ELSE
  SELECT 2

The parser needs to identify the IF keyword as a new statement instead of an alias for tbl and the ELSE as part of the conditional statement instead of an alias to 1. Moreover, MSSQL doesn't support IF/ELSE as explicit (after AS) or implicit table or column aliases.

Removed the assumption that every keyword after AS is an alias, and extended MSSQL to exclude IF/ELSE as alias.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant