Robert,
Thanks for the response. I tried what you suggested however, this is
what is happening. I have a .sql script whereby I drop tables, create
tables and then insert data into multiple schemas using the
SCHEMANAME.TABLENAME for qualifying each table.
It would appear that after I submit the entire script the DROP tables
runs successfully but I do not see that any of the tables have been
created and consequently no data has been inserted. However, I do have
success when I run the CREATE and INSERT statements separately from the
DROP.
Thanks in advance for any additional help or direction that you can give
me.
Regards.
Here is the first part of my script because it is too long I could not
include it all with the insert statements following the create
statements:
DROP TABLE DVCCNTL.DVCCNTL_MSR;
DROP TABLE DVCCNTL.DVCCNTL_SAR;
DROP TABLE DVCCNTL.DVCCNTL_SAR_CODE;
DROP TABLE DVCCNTL.DVCCNTL_VAR;
DROP TABLE INVITEM.INVITEM_ITL;
DROP TABLE INVITVND.INVITVND_VNI;
DROP TABLE INVITVND.INVITVND_VNI_PRICE;
DROP TABLE INVMFR.INVMFR_MFR;
DROP TABLE INVNOTES.INVNOTES;
DROP TABLE INVNOTES.INVNOTES_NOTE;
DROP TABLE INVPICK.INVPICK_TRK;
DROP TABLE INVPO.INVPO_POI_APV;
DROP TABLE INVPO.INVPO_POI;
DROP TABLE INVPO.INVPO_RQI;
DROP TABLE INVPO.INVPO_RQM_APV;
DROP TABLE INVPO.INVPO_RQM;
DROP TABLE INVTBLS.INVTBLS_DEL;
DROP TABLE VENDMSTR.VENDMSTR_VNM;
CREATE TABLE DVCCNTL.DVCCNTL_MSR
(
PKEY INT PRIMARY KEY not null,
DEFLTENTITYCODE VARCHAR(3) not null,
DEPTNAME VARCHAR(40),
EMAILADDR VARCHAR(40),
LOCKOUTIND CHAR(1) not null,
MASTRKEY VARCHAR(12) not null,
OPERTRID VARCHAR(8) not null,
RECRDSTATUSCODE CHAR(1) not null,
RECRDSTATUSDATE VARCHAR(8) not null,
RECRDTYPE VARCHAR(3) not null,
USERNAME VARCHAR(40) not null
);
-----Original Message-----
From: Robert Manning [mailto:rob...@gm...]
Sent: Monday, December 04, 2006 4:12 PM
To: Savoy, Melinda
Cc: squ...@li...
Subject: Re: [Squirrel-sql-users] MySql
On 12/4/06, Savoy, Melinda <Mel...@te...> wrote:
>
>
>
> I am using MySql 5.0 and I connected to this database via Squirrel=20
> SQL. I have multiple schemas/databases under my localhost. However,=20
> when I try and run a .sql script that drops tables from multiple=20
> schemas & then populates them in the various schemas I run into an=20
> error saying that it does not recognize the first schema name to drop=20
> the table. I can run this thru MySQL but not through Squirrel and it
would be great if I could.
As long as in each statement you qualify the table name with the schema
it shouldn't be a problem. I'm using 5.0.22 and I can create and drop
tables in schemas other than the one I connected to (<dbname> in url
jdbc:mysql://localhost:3306/<dbname>). Note: there is ongoing
consideration being given to the fact that only one catalog's tables
(catalog is really the term for schema in MySQL) can be accessed in the
object tree based on the catalog selected in the catalog selector at the
top of the session window.
Rob
The information contained in this message and any attachments is intended=
only for the use of the individual or entity to which it is addressed, a=
nd may contain information that is PRIVILEGED, CONFIDENTIAL, and exempt f=
rom disclosure under applicable law. If you are not the intended recipie=
nt, you are prohibited from copying, distributing, or using the informati=
on. Please contact the sender immediately by return e-mail and delete th=
e original message from your system.
|