#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    5
    Rep Power
    0

    insert statement problem IMPORTANT


    trying to put a long list of insert statements into the editor.
    basically a long list of this:
    INSERT INTO budget VALUES (2004,01,'G21501340',001,'Subcontracting',734003,74081);
    INSERT INTO budget VALUES (2004,01,'G21501340',002,'Subcontracting',734004,19483);

    etc...

    if i put the semi-colons i get error "invalid character"
    if i take them off i get error "SQL command not properly ended"

    i know this is probably a simple thing.
    what is the proper syntax ?
    PLEASE HELP
  2. #2
  3. No Profile Picture
    Senior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Canada
    Posts
    308
    Rep Power
    11
    The syntax is correct , but the problem is how r you running it. Run it as follows:

    For example your script name is test.sql.

    SQL>@test.sql

    it will work
  4. #3
  5. No Profile Picture
    Senior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Canada
    Posts
    308
    Rep Power
    11
    First you save it as .sql file by using the follwoing command:

    SQL>save test.sql repl

    Then use any one from these command:

    SQL>@test.sql

    OR

    SQL>start test.sql

IMN logo majestic logo threadwatch logo seochat tools logo