You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the logic check for invalid table names is:
SET @AcceptableSymbols = '_$' TABLE_NAME COLLATE SQL_LATIN1_GENERAL_CP1_CI_AI Like '%[^a-z' + @AcceptableSymbols + ']%'
The way I read that is if the table name has any character, anywhere in the table name that isn't an underscore, dollar sign, or the letters a through z, fail. A few problems in that logic:
Tables that start with underscore or dollar sign would require brackets.
Tables can have numerics in the name (just not for the first character)
Tables could have a space if they are bracketed.
Should this test assume brackets are in use when needed? Should this test actually attempt to create a table with the given name to test it's valiidty like this solution on StackOverflow?
The text was updated successfully, but these errors were encountered:
Currently, the logic check for invalid table names is:
SET @AcceptableSymbols = '_$' TABLE_NAME COLLATE SQL_LATIN1_GENERAL_CP1_CI_AI Like '%[^a-z' + @AcceptableSymbols + ']%'
The way I read that is if the table name has any character, anywhere in the table name that isn't an underscore, dollar sign, or the letters a through z, fail. A few problems in that logic:
Tables that start with underscore or dollar sign would require brackets.
Tables can have numerics in the name (just not for the first character)
Tables could have a space if they are bracketed.
Should this test assume brackets are in use when needed? Should this test actually attempt to create a table with the given name to test it's valiidty like this solution on StackOverflow?
The text was updated successfully, but these errors were encountered: