cancel
Showing results for 
Search instead for 
Did you mean: 

How to execute SQL scripts with MaxDB ..?

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

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