2

I have a script that we are using to update our ERP database to a new version,

UPDATE ENUM_CODES SET COLUMN_NAME = 'PAY_STATUS' WHERE TABLE_NAME = 'PAYABLE' and COLUMN_NAME = 'STATUS'
/

but i dont know why it has the / after the update portion. Does anyone know what that / means?

4

/ is the Oracle equivalent of SQL Server's GO...

It would seem that your ERP supports multiple RDBMS platforms, and you're looking at a script originally written for an Oracle database.

As it is currently written, you'll probably get a compilation error on SQL Server. Trade that / for a GO and you'll be in business (assuming the rest of the script is correct, of course).

  • 1
    I was going to answer but yours is almost complete. You can change the batch separator within SSMS to use forward slash: Sql Server || Change Batch Seperator - this will prevent it from throwing an error. – Mr.Brownstone Dec 14 '18 at 23:39
  • 4
    Changing the batch separator only fixes SSMS on that machine for that user. Other users on other machines with other preferences will need to also change that preference. And if you tried to use the script from PowerShell or sqlcmd, the / would still break. It's a possible solution, sure. But I wouldn't recommend it. – AMtwo Dec 15 '18 at 0:13
  • I did swap out the / for go's and the scripts did in fact run properly. – KySoto Dec 17 '18 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.