Re: mysqld_safe and timezone settings

2006-03-25 Thread Sutter, Michael
Thanks for your help, but this is the problem I have. I can't specify the timezone right when I start mysql with mysqld_safe --user=mysql --timezone=America/Argentina/Mendoza or by setting the TZ enviroment variable and than start the server. The timezone setting is ignored every time I start

Loading Data File into Database Table

2006-03-25 Thread Lola J. Lee Beno
I'm trying to import a set of data into a database (MySQL 5.0.17-max). Here's the query that I tried to run: LOAD DATA INFILE `standardwttype.txt` INTO TABLE StandardWeightType FIELDS TERMINATED BY `\t` LINES TERMINATED BY `\r` (standard_wt_type_id, standard_wt_desc, standard_wt_lud); And

Workbench Questions

2006-03-25 Thread Jesse
I've downloaded the MySQL Workbench, and am playing around with it. Pretty nifty program. However, I'm having trouble figuring out how to use it, and I can't seem to find any documentation for it anywhere. Here are a couple of questions: 1) Is there documentation anywhere? If so, where

Re: Is there anyway to return an array?

2006-03-25 Thread Peter Brawley
David, So is there anyway to return an array in mysql? No. Why not put the values in a table? PB - David Godsey wrote: This is not a typically thing that anyone would expect Mysql to do, however with the application I am writing it would be helpful. Here goes: The application stores

Re: Is there anyway to return an array?

2006-03-25 Thread nigel wood
David Godsey wrote: I know, I know, sounds like something that should be done in the presentation layer, howerver if possible, I would like to provide common data presentation to multiple presentation layers (written in different languages). So is there anyway to return an array in mysql?

Re: Loading Data File into Database Table

2006-03-25 Thread Peter Brawley
Lola I keep getting an error message: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'standardwttype.txt` Use single quotes not (dreaded) backticks. PB - Lola J. Lee Beno wrote:

Find records not in many-to-many table?

2006-03-25 Thread barney
Folk, This may be off-base for this list, but I've run out of places to look, sorry. I can't seem to find this anywhere, although I'm certain I've seen it before. How can I identify all the records in a table that are not referenced in a many-to-many table? I have a [unique] table of files

Re: Find records not in many-to-many table?

2006-03-25 Thread Stefan Kuhn
Use select first_table.id from first_table left join second_table using (id) where second_table.id is null Stefan Am Saturday 25 March 2006 19:10 schrieb barney: Folk, This may be off-base for this list, but I've run out of places to look, sorry. I can't seem to find this anywhere,

Create a constraint over 3 columns.

2006-03-25 Thread Scott Purcell
I would like to be able to avoid inserting a duplicate record. The duplication consists of 3 columns though. Here is the scenario. I have this existing table item (which is a product item) CREATE TABLE ITEM ( parent_id INT NOT NULL default 0, id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,

Re: Loading Data File into Database Table

2006-03-25 Thread Lola J. Lee Beno
Peter Brawley wrote: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'standardwttype.txt` Use single quotes not (dreaded) backticks. This seems to have fixed one problem. Now, I

Re: Loading Data File into Database Table

2006-03-25 Thread Lola J. Lee Beno
Lola J. Lee Beno wrote: ERROR 13 (HY000): Can't get stat of '/users/lolajl/documents/development/knitlib/datafiles/standardwttype.txt' (Errcode: 13) Never mind . . . I figured that I needed to add LOCAL to the query. Should have gone back to the manual page for LOAD DATA. -- Lola -

Re: Find records not in many-to-many table?

2006-03-25 Thread barney
Thanks, Stefan, But that only works if both tables have the same field name, doesn't it? If I use select FileKey from dl_files left join dl_merges using (FileID) where FileID is null MySQL returns Unknown column 'articles.dl_files.FileID' in 'on clause'. Correct me if I'm wrong, but wouldn't

Re: Loading Data File into Database Table

2006-03-25 Thread Peter Brawley
Now, I have another problem: ERROR 13 (HY000): Can't get stat of '/users/lolajl/documents/development/knitlib/datafiles/standardwttype.txt' (Errcode: 13) That's permission. is the dir 755? PB Lola J. Lee Beno wrote: Peter Brawley wrote: ERROR 1064 (42000): You have an error in your SQL

RE: Create a constraint over 3 columns.

2006-03-25 Thread Tim Lucia
CREATE TABLE `test`.`A` ( `X` INTEGER, `Y` INTEGER, `Z` INTEGER, UNIQUE `unique_x_y_z`(x,y,z) ) ENGINE = MYISAM; insert into a (x,y,z) values (1,2,3); insert into a (x,y,z) values (1,1,3); insert into a (x,y,z) values (1,2,3); 3 Duplicate entry '1-2-3' for key 1 #1062 -Original

Date Field Reverting to 0000-00-00 Format

2006-03-25 Thread Lola J. Lee Beno
I have a bunch of data where one of the columns is a date field. Here's a sample of the data that I have: 1 4 14 150 1 0 0 0 1 0 2005-01-15 10:15:42.41837 2 8 15 120 1 0 0 0 2

Re: Date Field Reverting to 0000-00-00 Format

2006-03-25 Thread Michael Stassen
Lola J. Lee Beno wrote: I have a bunch of data where one of the columns is a date field. Here's a sample of the data that I have: 141415010001 02005-01-15 10:15:42.41837 281512010002 02005-01-15 10:22:37.756594 36

Re: Find records not in many-to-many table?

2006-03-25 Thread Peter Brawley
barney Correct me if I'm wrong, but wouldn't I have to modify the column name in one of the tables in order for that to work? Or is there a syntax in the join lexicon that I can use to alias one of the column names within the query? I can't modify the existing table structure(s). If the

Re: Find records not in many-to-many table?

2006-03-25 Thread Michael Stassen
barney wrote: Thanks, Stefan, But that only works if both tables have the same field name, doesn't it? If I use select FileKey from dl_files left join dl_merges using (FileID) where FileID is null MySQL returns Unknown column 'articles.dl_files.FileID' in 'on clause'. Correct me if I'm wrong,

Re: Find records not in many-to-many table?

2006-03-25 Thread barney
I wish! That's the first thing that occurred to me ... unfortunately, this must be done by query ... I'm not allowed to create tables sigh /. Seems the guy I'm doin' this for doesn't trust me that far ... he got burned pretty badly a few years ago by a developer building in back-door access