Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False negative on no whitespace before and/or after "*" or delimited identifier in SELECT list #152

Open
srutzky opened this issue Oct 30, 2020 · 0 comments

Comments

@srutzky
Copy link

srutzky commented Oct 30, 2020

Little known fact, but at least some SQL dialects, such as T-SQL, don't require whitespace before or after certain characters in the SELECT list:

  • *
  • [
  • ]
  • (
  • )

The following are all completely valid T-SQL and I just confirmed that they all return the expected results without any errors:

SELECT*FROM sys.objects
SELECT *FROM sys.objects
SELECT* FROM sys.objects

SELECT[name]FROM sys.objects
SELECT [name]FROM sys.objects
SELECT[name] FROM sys.objects

SELECT*,[name]FROM sys.objects
SELECT[name],*FROM sys.objects

SELECT([name])FROM sys.objects

P.S. I'm not sure if this behavior relates to Issue #100 or not (in terms of how the * is handled).

Take care,
Solomon...
https://SqlQuantumLift.com/
https://SqlQuantumLeap.com/
https://SQLsharp.com/

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

No branches or pull requests

1 participant