Hello Chris,
you wrote :
> i have a sql script (generated with apache Torque) and want
> to import it
> with SQL Studio, but there are some erros with command seperators and
> some missing keywords. also there are problems with column
> names SECOND,
> MINUTE, and so on... i have attached the script, please can somebody
> give me hints how the sql script should look like?
1. comment lines start with two slashes (i.e. '//').
2. the individual statements of the 'script' must be separated
with (at least) one comment line containing nothing but the comment signs ('//') .
Don't use semicolons.
3. If you use names which are equal to SQL reserved words
(SQL studio displays them in blue) you have to put them in
double quotes.
Also note that all names which are not quoted this way
are converted to uppercase by the database kernel.
I modified and tested a few lines from your script :
//-----------------------------------------------------------------------------
//-- TURBINE_PERMISSION
//-----------------------------------------------------------------------------
drop table TURBINE_PERMISSION cascade
//
CREATE TABLE TURBINE_PERMISSION
(
PERMISSION_ID INTEGER NOT NULL,
PERMISSION_NAME VARCHAR (99) NOT NULL,
OBJECTDATA LONG BYTE,
UNIQUE (PERMISSION_NAME)
)
//
ALTER TABLE TURBINE_PERMISSION
ADD PRIMARY KEY (PERMISSION_ID)
//
//-----------------------------------------------------------------------------
//-- TURBINE_ROLE
//-----------------------------------------------------------------------------
drop table TURBINE_ROLE cascade
//
CREATE TABLE TURBINE_ROLE
(
ROLE_ID INTEGER NOT NULL,
ROLE_NAME VARCHAR (99) NOT NULL,
OBJECTDATA LONG BYTE,
UNIQUE (ROLE_NAME)
)
//
ALTER TABLE TURBINE_ROLE
ADD PRIMARY KEY (ROLE_ID)
//
works.
But be aware that 'SQL scripting' is not really a feature of SQL Studio.
There are no means to control the flow of execution (like 'if...then' etc)
for example.
The commandline tool 'loadercli' is designed to execute large scripts,
it recognizes control statements and is much more performant.
It is probably also easier to convert your extract to
the syntax 'loadercli' understands than to the 'SQL Studio format'.
regards,
Markus Stausberg
SAP Labs Berlin
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]