Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. This one has me stumped

This one has me stumped

Scheduled Pinned Locked Moved Database
comhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Andy Brummer
    wrote on last edited by
    #1

    I'm at the last stage of a complete overhaul of our build scripts and I'm down to one last issue. I can't seem to use sqlcmd to execute a create procedure statement that has a raiserror command in it. sqlcmd pre parses out the command and fails without executing. There doesn't seem to be any documented escape that I can figure out.

    Curvature of the Mind now with 3D

    W 1 Reply Last reply
    0
    • A Andy Brummer

      I'm at the last stage of a complete overhaul of our build scripts and I'm down to one last issue. I can't seem to use sqlcmd to execute a create procedure statement that has a raiserror command in it. sqlcmd pre parses out the command and fails without executing. There doesn't seem to be any documented escape that I can figure out.

      Curvature of the Mind now with 3D

      W Offline
      W Offline
      Wendelius
      wrote on last edited by
      #2

      Just made a test with this and didn't have any problems. Could it be that you're having problems with for example apostrophes in the script in the RAISERROR statement. The test script I used was:

      create procedure ptest as
      begin
      raiserror( 'message', 10, 10 );
      end;
      go

      and the command:

      sqlcmd -S .\instancename -E -d dbname -i testproc.txt

      Could you post the error message and the part of the script that's causing problems. Also have a test drive with the script above to see if it also causes the same problem.

      The need to optimize rises from a bad design.My articles[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups