Dear All,
Please find the below query which will raise error.PFB Query.
Error : Error in advanced query SQL2: Incorrect syntax near the keyword 'IS'. Incorrect syntax near ','. An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name.
Please help me to outcome of this
regards,Hiren Rathod
Hello.
From the message, I assume it can something as simple as defining an alias for the column inside IN:SELECT TRY_CONVERT(INT, value) AS ConvertedValueWas Neo's help useful? It changed a lot of things, not sure if all needed.Note: If you want help with SQL code, better copy the SQL instead of pasting an image.
In SQL Server, double quotes "" are not valid string literals. SQL Server uses single quotes ' ' for string values. Double quotes are used for identifiers (like column names) in some SQL configurations.
So this part: sqlCopyEditWHERE TRY_CONVERT(INT, value) <> ""
…is interpreted incorrectly and leads to: Incorrect syntax near ',' or empty alias names
Replace: sqlCopyEditWHERE TRY_CONVERT(INT, value) <> ""
With: sqlCopyEditWHERE TRY_CONVERT(INT, value) IS NOT NULL
This ensures that only successfully converted integers are returned.