function 'STRING_SPLIT' invalid

KhoaNTKhoaNT Posts: 2 New member
edited May 6, 2020 4:53AM in SQL Change Automation
When I run script built SQL on Server . I received a error func String_split

But i run at local then

plz help me. tks all


  • way0utwestway0utwest CO, USA Posts: 307 Rose Gold 1
    It's not clear where you are building. We always build on SQL Server, so this is a version issue, likely.  Depending on how you have this configured, String_Split() was added in SQL Server 2016, if you you build on an earlier version, this isn't a valid function.

  • KhoaNTKhoaNT Posts: 2 New member
    edited May 7, 2020 9:54AM
    I make sure STRING_SPLIT func enable.

    I 'm wondering about this error. Because i run this script build on them same target server.
    i run script on local computer then ok  but run script with jenkens failed.
    can you explain more clear about this error?

    thank you alot !!! :)
  • Phil_Fact0rPhil_Fact0r Posts: 20 Bronze 2
    edited August 7, 2020 4:58PM
    In Invoke-DatabaseBuild, The -temporaryDatabase must be at the correct level, either the same or higher than the target. In this case, it must be at 2016. I notice that you have the -temporaryDatabase commented out, so it is using your LocalDB WIN-F8PEQP4PQ41\LOCALDB, and this isn't the server that you show in the last screenshot. You are executing the script on the localDB on the machine you're executing the script from. 
  • way0utwestway0utwest CO, USA Posts: 307 Rose Gold 1
    Thanks. Phil, and apologies, KhoaNT. Not sure how I missed your update to the post. I suspect I lost a notification in email.

    As Phil mentioned, when you build, you are not necessarily building on the same instance/db.  A build is a complete creation of a new db from scratch, to validate your code. The Jenkins agent may be building in LocalDB, or if you've specified this same instance you're developing on, they it can build there.
Sign In or Register to comment.