#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    3
    Rep Power
    0

    Firebird Interactive SQL Panel


    Hi!

    I have a multi-line command that I'm trying to run in the Firebird Interactive SQL Panel (not the command line). I can run each line independently & it works fine, but I can't seem to come up with a workable script to run it all at once (dealing with a novice here). Here's what I'm working with.....

    update catalog set mfg = 'ABC' where mfg = '123'
    update catalog set mfg = 'DEF' where mfg = '246'
    update catalog set mfg = 'GHI' where mfg = '789'
    update catalog set mfg = 'CCC' where mfg = '222'
    update catalog set mfg = 'FFF' where mfg = '999'

    Can anyone help?

    Thanks!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2006
    Location
    Carlsbad, CA
    Posts
    2,055
    Rep Power
    383
    Not quite sure what your SQL Panel is; but have you tried adding a semi colon at the end of each command?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    3
    Rep Power
    0
    Thanks for the reply!

    The SQL Interactive Panel is built into the application that I'm running. It provides an interface for SQL functions so that you don't need to use the command line.

    I had tried the semi-colons, but I get an error message when executed...

    Dynamic SQL error
    error code = -104
    Token unknown line 2, char 1
    update

    Regards.


    Originally Posted by clivew
    Not quite sure what your SQL Panel is; but have you tried adding a semi colon at the end of each command?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2006
    Location
    Carlsbad, CA
    Posts
    2,055
    Rep Power
    383
    AS we do not know the capabilities of the application you are using it is hard to make anything other than guesses. Are you sure this panel is capable of multiple queries.
    It complained about the word update not the semi-colon so you might try surrounding it all with a begin / end pair; but do not hold your breath.

    I think you need to ask the author of your application.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    3
    Rep Power
    0
    Originally Posted by clivew
    AS we do not know the capabilities of the application you are using it is hard to make anything other than guesses. Are you sure this panel is capable of multiple queries.
    It complained about the word update not the semi-colon so you might try surrounding it all with a begin / end pair; but do not hold your breath.

    I think you need to ask the author of your application.
    Thanks again! I think you probably hit the issue as I'm guessing that the panel will not allow multiple queries. I'm looking at a few examples & none of them have more than one query.

    Much appreciated!

IMN logo majestic logo threadwatch logo seochat tools logo