Okay, thanks guys! I'll lob this ball atcha, then:
My main data table is 'trcdatabase2'. I currently use perl programs to get
our in-house exported flat-file database into web-ready shape, but these
can go *really* *slowly*, so I wanted to harness the speed of SQL. I've
created a couple of copies of the table, 'newdatabase' & 'readydatabase'; I
load the flat-text export file directly into 'newdatabase', then I had it
in mind to work various perl/sql transformations upon it which would get
funneled into the empty 'readydatabase' table.
The first thing I wanted to do was export all of the data which is in both
'newdatabase' & 'trcdatabase2' into the 'readydatabase' table. So I'd
basically be moving the rows from the active & web-ready 'trcdatabase2'
into 'readydatabase' if & only if the catalog number ('catalog') was still
included in the newly-uploaded 'newdatabase'. Here was my best guess:
INSERT INTO readydatabase SELECT trcdatabase2.* FROM trcdatabase2,
newdatabase WHERE newdatabase.catalog = trcdatabase2.catalog
This caused horrible problems. It ran & ran, & then I had some type of
monster table ('readydatabase') which nearly kept me from opening the MySQL
shell interpreter, & took about 10 minutes just to DROP.
Did I set up some kind of infinite loop? Is it because I've failed to set
up 'catalog' as a primary key?
If the latter, I've got another problem: I seem to have CREATE, but not
ALTER TABLE privileges. I'm still waiting to hear back from my sysadmin
about this.
I hope to do all sorts of similar comparison transformations, & I'm afraid
I just don't have table linking down conceptually, or something. Any help
would be most appreciated.
They're running MySQL 3.22.32 on Red Hat 5.2, incidentally. TIA!!
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php