Skip to Content
avatar image
Former Member

How to execute SQL scripts with MaxDB ..?

Hi all,

i got some clue from another thread and i observed the command is like

sqlcli -d DBNAME -u SQLUSER,SQLPASS -i filename.sql -c <delimiter> is there,

when i use this the only first query is successfully executing,

this might be problem with delimiter.

can any body help how to use delimiter in the script file with an example.

thanks in advance.

--Hari

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Dec 08, 2006 at 02:27 AM

    Hi hari,

    Default value for the seperator is "//"

    http://help.sap.com/saphelp_nw2004s/helpdata/en/cc/e528403a97e801e10000000a155106/frameset.htm

    (Check batchFile option)

    Regards, Anilkumar

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 08, 2006 at 03:57 AM

    Hi,

    Sample Script

    CREATE TABLE city

    (zip CHAR (5) KEY CONSTRAINT zip BETWEEN '10000' AND '99999',

    name CHAR(20) NOT NULL,

    state CHAR(2) NOT NULL)

    //

    CREATE TABLE customer

    (cno FIXED (4) KEY CONSTRAINT cno BETWEEN 1 AND 9999,

    title CHAR (7) CONSTRAINT title IN ('Mr', 'Mrs', 'Company'),

    firstname CHAR (10) ,

    name CHAR (10) NOT NULL,

    zip CHAR (5) CONSTRAINT zip BETWEEN '10000' AND '99999',

    address CHAR (25) NOT NULL,

    FOREIGN KEY (zip) REFERENCES city ON DELETE RESTRICT)

    //

    \dt customer

    //

    COMMIT

    Regards

    Ayyapparaj

    Add comment
    10|10000 characters needed characters exceeded