STRING_SPLIT complaining about missing parameter

LouisBLouisB Posts: 2 New member
Hi there
I'm using SSMS with SQL Server 2019 and constantly get error messages from SQL Prompt about STRING_SPLIT:



I guess this is the "enable_ordinal" parameter that SQL Prompt wants to see. However, accodring to T-SQL Reference https://docs.microsoft.com/en-us/sql/t-sql/functions/string-split-transact-sql?view=sql-server-ver15 this parameter is optional.

My question is: how can I make SQL Prompt not complain about it?
Tagged:

Answers

  • Hi @LouisB,

    I've taken a look at this one in a VM with no SQL Prompt installed to see how a base SSMS handles the STRING_SPLIT. It appears it does the same thing as you've described above. Below is a screenshot of said VM with no SQL Prompt:



    The weird thing is, even if you input the ordinal value, it doesn't actually work. Example, I used one of the test queries that are provided on the STRING_SPLIT documentation site that you mentioned above, and tried to run it. Below is the result from that:



    You'll notice SSMS isn't complaining about the lack of arguments, but now the query itself doesn't work. Unfortunately, it appears this might be a Microsoft SQL issue as opposed to SQL Prompt.

    Kind regards,

    Kurt McCormick
    Product Support Engineer, Redgate

    Need help? Take a look at our Help Center

  • LouisBLouisB Posts: 2 New member
    Hi Kurt

    The ordinal parameter is only supported on Azure SQL Database:
    The enable_ordinal argument and ordinal output column are currently only supported in Azure SQL Database, Azure SQL Managed Instance, and Azure Synapse Analytics (serverless SQL pool only).

    So, then it is an SSMS issue, thanks for clarifying that! 


Sign In or Register to comment.