Re: loading csv file - nulls

2007-06-19 Thread Ananda Kumar
Hi, I am not sure of any command that does the replace, but u need to manually do the replace in the data file. On 6/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hello, If my load data statment is such: load data infile 'myfile.csv' into table mytab1 fields delimited by ',' lines term

Re: loading csv file - nulls

2007-06-19 Thread jdg4700
Hello, If my load data statment is such: load data infile 'myfile.csv' into table mytab1 fields delimited by ',' lines terminated by '\n' (my_code,my_amt); Where do I do the replace? How do I translate the N/A into \N on the fly? Thank you. Ananda Kumar <[EMAIL PROTECTED]> wrote: > rep

Re: loading csv file - nulls

2007-06-19 Thread Ananda Kumar
replace N/A with \N, this will get inserted as NULL On 6/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I have following table : mytab1 -- my_code varchar(3) my_amt float(10,2) I also have the following file my.csv to load: ABC,23,41 DEF,234,99 GHI,N/A JKL,99.50 My 'load data in

Re: Reapply bin-log question( Help Please)

2007-06-19 Thread Ananda Kumar
One possible way is to spool the contents of bin-log into a file. mysqlbinlog oca-bin.000554 > binlog_sql.sql. This will give you all the data present in oca-bin.000554. Then you can set the foreign key check to "0" at the session level and then apply the binlog_sql.sql. Comment our everything

loading csv file - nulls

2007-06-19 Thread jdg4700
I have following table : mytab1 -- my_code varchar(3) my_amt float(10,2) I also have the following file my.csv to load: ABC,23,41 DEF,234,99 GHI,N/A JKL,99.50 My 'load data infile' bombs loading the 3rd row. Obviously, it not the correct data type. On my load data scrip

RE: maximum number of records in a table

2007-06-19 Thread John Mancuso
We have 1/2 a billion records in one Innodb table on one server. Still extremely quick. The only limit is hardware John Mancuso Linux Administrator/MySQL DBA IT Infrastructure American Home Mortgage w: 631-622-6382 c: 516-652-2475 -Original Message- From: Paul DuBois [mailto:[EMAIL PROT

Re: selecting everyting from 2 non-identical tables.

2007-06-19 Thread Mogens Melander
On Tue, June 19, 2007 23:42, Olexandr Melnyk wrote: > 2007/6/19, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: >> >> My frist post was not worded correctly. I cannot join two tables as all >> the >> rows are unique. > > > What's wrong with my solution? > > 2007/6/19, Olexandr Melnyk <[EMAIL PROTECTED]>:

Re: mysqldump problem with large innodb tables...

2007-06-19 Thread Hartleigh Burton
Hi Dusan, You replied to a forum post of mine on mysql.com yeah? ;) I have tried adjusting the max_allowed_packet on both the server and client. Both are set to 1G now (apparently the highest value accepted) even though each row is no larger than 100M at very most. I am thinking this may h

Re: Slow query examining 10 Million Rows, please help !!!

2007-06-19 Thread Dan Buettner
I would try adding an index on the freetags.tag column as you are querying against that column with WHERE tag = 'shot' HTH, Dan On 6/19/07, Kishore Jalleda <[EMAIL PROTECTED]> wrote: Hi everybody, we have this super slow query which is going through more than 10 million ro

Re: How do you reference custom column names

2007-06-19 Thread Dan Nelson
In the last episode (Jun 19), Scott Haneda said: > SELECT 1+1 as foo, 2 as bar, foo+bar > > This will not work, but I think you can see what I am trying to do. > I need to run a pretty hefty update on a database, and there are some > pretty heavy calculations I will be doing. The result of many

Slow query examining 10 Million Rows, please help !!!

2007-06-19 Thread Kishore Jalleda
Hi everybody, we have this super slow query which is going through more than 10 million rows to retrieve results, here is the query and other information, I tried a few things to make this faster , but failed , so any help from you guys in making this faster is greatly appreciate

How do you reference custom column names

2007-06-19 Thread Scott Haneda
SELECT 1+1 as foo, 2 as bar, foo+bar This will not work, but I think you can see what I am trying to do. I need to run a pretty hefty update on a database, and there are some pretty heavy calculations I will be doing. The result of many of those, needs to be further used to make updates on other

Re: selecting everyting from 2 non-identical tables.

2007-06-19 Thread Olexandr Melnyk
2007/6/19, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: My frist post was not worded correctly. I cannot join two tables as all the rows are unique. What's wrong with my solution? 2007/6/19, Olexandr Melnyk <[EMAIL PROTECTED]>: select id, name, age, null as height from table1 union select id,

Re: maximum number of records in a table

2007-06-19 Thread Paul DuBois
At 6:24 PM -0400 6/11/07, kalin mintchev wrote: hi all... from http://dev.mysql.com/doc/refman/5.0/en/features.html: "Handles large databases. We use MySQL Server with databases that contain 50 million records. We also know of users who use MySQL Server with 60,000 tables and about 5,000,000,00

Re: Change in behaviour in version 5.0.41

2007-06-19 Thread Paul DuBois
At 12:10 PM -0400 6/18/07, Baron Schwartz wrote: Paul DuBois wrote: At 3:29 PM +0100 6/15/07, Ben Clewett wrote: Dear MySql, I have noticed a change in behaviour in MySql 5.0.41 from 5.0.26 with date comparisons. In 5.0.26:'2007-06-15' = '2007-06-15 00:00:00' is True. In 5.0.41:

Reapply bin-log question( Help Please)

2007-06-19 Thread Clyde Lewis - DBA
Guys, I'm attempting to reapply a number of bin-log files in a effort to restore all changes that was made to a database. I'm performing the following command, but continue to get a foreign key constraint error message when doing so. Has anyone ever ran into this issue, and if so, what is a p

Re: ODBC Drivers 3 and 5

2007-06-19 Thread Jim Winstead
On Tue, Jun 19, 2007 at 03:15:19PM -0400, [EMAIL PROTECTED] wrote: > So I guess the same thing goes with the JDBC connectors? > > http://dev.mysql.com/downloads/connector/j/5.0.html > > > > For example.. If I'm using Coldfusion to do jdbc calls in version 5 will I > have le

Re: ODBC Drivers 3 and 5

2007-06-19 Thread Lucas . CTR . Heuman
So I guess the same thing goes with the JDBC connectors? http://dev.mysql.com/downloads/connector/j/5.0.html For example.. If I'm using Coldfusion to do jdbc calls in version 5 will I have less functions on my ASP server that is using ODBC version 3? Should I be using the

Re: used command isn not allowed

2007-06-19 Thread Martin Gainty
needs an indication on where to find the file (local or otherwise) http://dev.mysql.com/doc/refman/5.1/en/load-data.html For security reasons, when reading text files located on the server, the files must either reside in the database directory or be readable by all. Also, to use LOAD DATA INFIL

Re: used command isn not allowed

2007-06-19 Thread David Southwell
On Tuesday 19 June 2007 09:05:36 Gordon wrote: > I tried running this load data command on Server version: 5.0.27 and get > the 1148 error. I'm not sure if it is referring tho the comand client or > the server. > > I also do not understand why the command {or which part} it is complaining > about.

Re: Best Database Representation of a Chain of Command

2007-06-19 Thread Peter Brawley
>I'd like to represent our organization's chain of command (i.e. who is whose >boss) in a database. For some ideas see http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html PB David T. Ashley wrote: I'd like to represent our organization's chain of command (i.e. who is whose bo

Character Encoding problem

2007-06-19 Thread Shreko
My machine with a good old mysql 4.0 crashed last week, and going trough recovery I ended up with wrong encoding. Right now mysql is on the same version as before the crash, but at one step data was in newer version of mysql (5.0.x) and I think that this problem I have originated there. Basically,

Best Database Representation of a Chain of Command

2007-06-19 Thread David T. Ashley
I'd like to represent our organization's chain of command (i.e. who is whose boss) in a database. The reason is that in some contexts, my database application needs to know who can view whose time and project records (and the rule is that anyone above in the chain of command can, anyone at the sa

RE: ERROR 2002 (HY000): Can't connect to local MySQL server

2007-06-19 Thread John Mancuso
I would try my best to find a way to login as root or maybe user mysql. John Mancuso Linux Administrator/MySQL DBA IT Infrastructure American Home Mortgage w: 631-622-6382 c: 516-652-2475 -Original Message- From: Ahamarshan jn [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 19, 2007 12:4

RE: INNER versus OUTER

2007-06-19 Thread Robert DiFalco
Any thoughts? -Original Message- From: Robert DiFalco [mailto:[EMAIL PROTECTED] Sent: Monday, June 18, 2007 10:10 AM To: mysql@lists.mysql.com Subject: INNER versus OUTER I'm using the latest MySQL with InnoDB and something is happening I don't understand. I am going to try this first b

RE: ERROR 2002 (HY000): Can't connect to local MySQL server

2007-06-19 Thread John Mancuso
Start mysqld_safe with --console OR --error-log=//errlog.err --console will print your errors to the screen ./mysqld_safe --console John Mancuso Linux Administrator/MySQL DBA IT Infrastructure American Home Mortgage w: 631-622-6382 c: 516-652-2475 -Original Message- From: Ahamarshan jn

Re: ODBC Drivers 3 and 5

2007-06-19 Thread Jim Winstead
On Tue, Jun 19, 2007 at 10:24:11AM -0400, [EMAIL PROTECTED] wrote: > I have been looking online for an explanation of the differences between > ODBC drivers 3 and 5. I'm sure it is someplace simple to find. Does > anyone here know? Connector/ODBC 3.51 is an ODBC driver that supports only the A

used command isn not allowed

2007-06-19 Thread Gordon
I tried running this load data command on Server version: 5.0.27 and get the 1148 error. I'm not sure if it is referring tho the comand client or the server. I also do not understand why the command {or which part} it is complaining about. Probably something obvious, but I just can't see it. A

RE: ERROR 2002 (HY000): Can't connect to local MySQL server

2007-06-19 Thread John Mancuso
Have you looked in your mysql error log in your data directory? Check //.err FYI- the locate command needs to be updated. It can show old info if you don't run updatedb frequently John Mancuso Linux Administrator/MySQL DBA IT Infrastructure American Home Mortgage w: 631-622-6382 c: 516-652-2475

ERROR 2002 (HY000): Can't connect to local MySQL server

2007-06-19 Thread Ahamarshan jn
Hi, I was appending Grant previledges to some databases in mysql; either i typed something wrong or there is a bug which I am uncertain about, but what happened was I could not login as su anymore. I then solved this problem by changing grp (chgrp) permission in /bin/su and it works fine. However

Re: Storing a linked list

2007-06-19 Thread Baron Schwartz
Celko also discusses them in SQL For Smarties. Baron Peter Brawley wrote: Matt >I'd like to store paths to specific destinations... See -- Tropashko's 'materialized modell' eg http://www.dbazine.com/oracle/or-articles/tropashko4 -- the airports example at http://www.artfulsoftware.com/mysq

Re: KEY vs. INDEX

2007-06-19 Thread Baron Schwartz
Hi, David T. Ashley wrote: In reading the syntax of the CREATE TABLE statement, I'm a little confused by the two keywords KEY and INDEX. What does one use when one wants MySQL to arrange the column so that it can find a given record "WHERE column=whatever" in approximately O(log N) time? This

Re: ODBC Drivers 3 and 5

2007-06-19 Thread Martin Gainty
Good Morning Lucas From what i've been able to gather Type 3 is a bridging technology which accomplishes the ODBC-JDBC communication objective but is slower than native Type 4 thin client driver counterpart as there are a min of 3+ components which are used ODBC Bridge JDBC Best doc I've se

KEY vs. INDEX

2007-06-19 Thread David T. Ashley
In reading the syntax of the CREATE TABLE statement, I'm a little confused by the two keywords KEY and INDEX. What does one use when one wants MySQL to arrange the column so that it can find a given record "WHERE column=whatever" in approximately O(log N) time? This is a "key", right? MySQL use

Re: Type Mismatch

2007-06-19 Thread J.R. Bullington
It's not an "error". MySQL Cast will do the 'rounding' for you. The acutal case is that the 64-bit integer floating value is not affected by the CAST. See the manual page for CAST: http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html If you would prefer to do the roundin

Re: Storing a linked list

2007-06-19 Thread Peter Brawley
Matt >I'd like to store paths to specific destinations... See -- Tropashko's 'materialized modell' eg http://www.dbazine.com/oracle/or-articles/tropashko4 -- the airports example at http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html PB - Matt Juszczak wrote: Hi all, I'

Looking for a MySQL 5 DBA

2007-06-19 Thread John Mancuso
Looking for a MySQL 5 DBA with linux experience to work with me for a large company on Long Island New York. Good salary/benefits etc. We're doing a lot of cutting edge stuff with replication as well as other areas. Feel free to call me or drop me an email with a resume if you know anyone. Sorry if

ODBC Drivers 3 and 5

2007-06-19 Thread Lucas . CTR . Heuman
I have been looking online for an explanation of the differences between ODBC drivers 3 and 5. I'm sure it is someplace simple to find. Does anyone here know? Phone 609.485.5401

RE: {Spam?} Re: mysqldump problem with large innodb tables...

2007-06-19 Thread John Mancuso
Have you considered using the archive storage engine? I have gotten 30:1 compression using it. Create table archive_multimedia engine=Archive as select * from John Mancuso Linux Administrator/MySQL DBA IT Infrastructure American Home Mortgage w: 631-622-6382 c: 516-652-2475 -Original Mes

Re: Type Mismatch

2007-06-19 Thread Ian
On 19 Jun 2007 at 12:42, Critters wrote: > Hi, > I hope someone can help me with my problem, something that has come up > when moving code and DB to a new server: > > Connection: > driver={MySQL ODBC 3.51 > DRIVER};server=localhost;uid=xx;pwd=xx;database=xx;option=16387

Re: Storing a linked list

2007-06-19 Thread Mogens Melander
How about: $id1 = 1; $id2 = 0; while ($id1) /** or ($id2 != 8) **/ { $sql = "select * from table where id1=$id1"; $row=query($sql); $id1=$row->id1; $id2=$row->id2; do_stuff(); $id1 = $id2 } On Tue, June 19, 2007 10:58, Matt Juszczak wrote: > Hi

Re: Type Mismatch

2007-06-19 Thread Critters
Thanks for responding. If I just response.write score I get 6.5714 I got it working by doing this: cast(sum_score/sum_votes as signed) AS 'score' Which returns 7. So it is a MySQL error? I would prefer to do the rounding in ASP and not have to update other scripts giving the same problems. --

re: Type Mismatch

2007-06-19 Thread J.R. Bullington
This is an ASP error, not a MySQL error. However, try doing a response.write rs("Score") response.flush Then you will see why you are getting the mismatch error. It is probably the fact that rs("Score") is not returning an integer or number of any kind (i.e. if rs("score") is null). HTH! --

Re: selecting everyting from 2 non-identical tables.

2007-06-19 Thread ross
My frist post was not worded correctly. I cannot join two tables as all the rows are unique. men id height name age fav team 1 - 176cm - John - 25-lakers 2 - 180cm - Rob - 40-yankies women id height name age no_of_children 3 - 166cm - mary - 22 - 2 4 - 175cm - betty - 48 - 4 I want to

Re: Sharing tables

2007-06-19 Thread Brent Baisley
If you don't want to change any code, you can look into using federated tables. But if your tables are local, you're adding unnecessary overhead. You can reference tables in other databases on the local machine by simply adding the database name before the table name: SELECT * FROM databas

Re: selecting everyting from 2 non-identical tables.

2007-06-19 Thread Olexandr Melnyk
select id, name, age, null as height from table1 union select id, name, null as age, height from table2 2007/6/19, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: select * from table1, table2 seems to give repeat rows for some reason. It is a Cartesian product. -- Sincerely yours, Olexandr Melnyk

RE: selecting everyting from 2 non-identical tables.

2007-06-19 Thread Jay Blanchard
[snip] I have two non-identical tables. They are pretty similar except a few fields. I want to select everything from both for example table1 id name age table2 id name height I want id name height age even if it returns null values. select * from table1, table2 seems to give repeat rows

selecting everyting from 2 non-identical tables.

2007-06-19 Thread ross
I have two non-identical tables. They are pretty similar except a few fields. I want to select everything from both for example table1 id name age table2 id name height I want id name height age even if it returns null values. select * from table1, table2 seems to give repeat rows for

Type Mismatch

2007-06-19 Thread Critters
Hi, I hope someone can help me with my problem, something that has come up when moving code and DB to a new server: Connection: driver={MySQL ODBC 3.51 DRIVER};server=localhost;uid=xx;pwd=xx;database=xx;option=16387 SQL: SELECT (sum_score/sum_votes) AS 'score' FROM xx

Sharing tables

2007-06-19 Thread Toan. Dang Anh
Dear All, I have multi databases with some table is the same structure. I want to collect this table to one database and share this table to other databases, how can I do that? I do not want to change code connect to database. Could I link table file to other?=20 Please help me. I use MySQL

error

2007-06-19 Thread Octavian Rasnita
Hi, I have tried using: mysqlcheck -u username -p database And the result: ... intranet.company_sectorOK intranet.comunicat OK mysqlcheck: Got error: 2013: Lost connection to MySQL server during query when executing 'CHECK TABLE ...

Re: mysqldump problem with large innodb tables...

2007-06-19 Thread DuĊĦan Pavlica
Try to look for Lost connection error in MySQL manual and it can give your some hints like http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html Dusan Hartleigh Burton napsal(a): Hi All, I have a database which is currently at ~10GB in it's test phase. It is containing uncompressed a

Storing a linked list

2007-06-19 Thread Matt Juszczak
Hi all, I've got a table such as the following: id1 char id2 char sample data looks like this: id1 id2 1 3 2 4 3 5 5 6 6 8 And of course another table has something like: id info1 info2 info3 1 blahblahblah 2 blahblahblah

RE: Hiding columns used in GROUP BY and HAVING clauses

2007-06-19 Thread Edward Kay
> -Original Message- > From: Baron Schwartz [mailto:[EMAIL PROTECTED] > Dan Nelson wrote: > > In the last episode (Jun 18), Edward Kay said: > >> From: Dan Nelson [mailto:[EMAIL PROTECTED] > >> > >> At the moment, I have this and it works: > >> > >>select * from conta