Re: Math problem

2006-06-22 Thread C.R.Vegelin
Hi Karl, Your question: can I add a $ when you select a view. I suggest to include $ sign in the field alias, like: Select title_id, ytd_sales * price AS `Turnover $` From titles; HTH, Cor - Original Message - From: "Karl Larsen" <[EMAIL PROTECTED]> To: "Chris W" <[EMAIL PROTECTED]>

Re: Autoindexing

2006-06-22 Thread Keith Roberts
Under mysql 5.0.18 you can do something like: // get the current value of the auto_increment counter mysql> select @@auto_increment_offset; +-+ | @@auto_increment_offset | +-+ |1105 | +-+ 1 row in set (0.00

summing of my distance query

2006-06-22 Thread Scott Haneda
Mysql 4.0.18 ++---+--+-+--++ | Field | Type | Null | Key | Default | Extra | ++---+--+-+--++ | id | int(11) | | PRI | NULL | auto_increment

Re: Autoindexing

2006-06-22 Thread suomi
Hi Tom CREATE TEMPORARY TABLE tt SELECT * FROM your_table; TRUNCATE your_table; UPDATE tt SET your_index = NULL; INSERT INTO your_table SELECT * FROM tt; suomi Tom Ray [Lists] wrote: Hey, I have a really simple question (I hope)..I have a database that has a field in it that autoindexes the

Re: if else statement

2006-06-22 Thread Michael Stassen
Song Ken Vern-E11804 wrote: > Hi, > > I'm trying to build a query in using SQL instead of doing it in Perl. > > I am trying to do something like this : > > If ((select col1 from table1 where id = 1) == 3) > Then > Select col2 from table2 where table2.id = 1; > Else > Select col2 from table3 where

Autoindexing

2006-06-22 Thread Tom Ray [Lists]
Hey, I have a really simple question (I hope)..I have a database that has a field in it that autoindexes the number. I screwed up and imported a bunch of wrong data. Up to row 200 it's right, beyond that it was wrong so I had delete it all. The problem now is the autoindexing is set to 1105, I

RE: if else statement

2006-06-22 Thread Song Ken Vern-E11804
Hi Peter, >SELECT IF(col1=3, (Select col2 from table2 where table2.id = 1), (Select >col2 from table3 where table3.id = 1)) FROM table1 WHERE id=1; Thanks you for you answers. Can I put SELECT statements inside the IF statement? Mysql give error ERROR 1064: Error in SQL syntax. Under Control F

Re: Exclusion Query

2006-06-22 Thread Peter Brawley
>SELECT * >FROM Customers C >LEFT OUTER JOIN Orders O >ON C.CustomerID = O.CustomerID >WHERE OrderID IS NULL OR C.CustomerID IS NULL >ORDER BY OrderID Correct except lose "OR c.customerID IS NULL", it makes no sense. PB - Daniel McQuay wrote: had a problem like this in class today

Re: Exclusion Query

2006-06-22 Thread Karl Larsen
Jeremy Rottman wrote: I am working on an MLS Exclusion report. In on table1 I have all the information we collect for our files. Each day I download an update our mls table (table2). what I am trying to do is find all the records in table2 that are not in table1. This is the query that I am

Re: Importing large data sets

2006-06-22 Thread Karl Larsen
Scott Haneda wrote: I have two chunks of data to import, one is in this format: "01001 - AGAWAM, MA","01001",0,0,291,249,0,"42.070206","-72.622739" Where it is comma sep and partially quoted The other is in this format "99502 ANCHORAGE, AK","256","265","1424","1962","1131","528","643","6209","9

Importing large data sets

2006-06-22 Thread Scott Haneda
I have two chunks of data to import, one is in this format: "01001 - AGAWAM, MA","01001",0,0,291,249,0,"42.070206","-72.622739" Where it is comma sep and partially quoted The other is in this format "99502 ANCHORAGE, AK","256","265","1424","1962","1131","528","643","6209","99502","61.096163", "-1

Re: Exclusion Query

2006-06-22 Thread Daniel McQuay
had a problem like this in class today and we solved it with a LEFT OUTER JOIN. we had to find customers who did not place an order or orders with no customers. this was in MSSQL but it may be something to work off of. USE Northwind SELECT * FROM Customers C LEFT OUTER JOIN Orders O ON C.Customer

Re: Math problem

2006-06-22 Thread Peter Brawley
>It appears that mysys 4.1 does not know how to multiply a dollar >amount to another number. Has anyone else seen this problem? If price is a string beginning with '$', MySQL will autoconvert SubString(price,2) to a numeric iif it's in a numeric expression, but you'd be much better off losing t

Re: Math problem

2006-06-22 Thread Karl Larsen
Chris W wrote: Karl Larsen wrote: I'm trying to multiply numbers one of which is money. The money looks like this: SELECT price FROM titles; | price | ++ | $20.00 | | $19.99 | | $7.99 | | $19.99 | | $11.95 | | $19.99 | | $14.99 | | $11.95 | | $22.95 | | $2.99 | | $10.95 | | $7.

Re: New to the group

2006-06-22 Thread Chris Sansom
At 14:38 -0500 22/6/06, mos wrote: If you want a more thorough book on PHP & MySQL there is: PHP and MySQL Web Development (3rd Edition) (Developer's Library) (Paperback) by Luke Welling, Laura Thomson I can't speak about the third edition, as I got started using what appears to be the first.

RE: New to the group

2006-06-22 Thread Keith Roberts
Well, php was designed basically from the ground-up as a replacement for CGI programming. AFAIK you can do similar things in PERL, but there is alot more to learn. php has an easy learning curve, and seems to be alot more suitable for server sided web programming than PERL. If you are an exper

Exclusion Query

2006-06-22 Thread Jeremy Rottman
I am working on an MLS Exclusion report. In on table1 I have all the information we collect for our files. Each day I download an update our mls table (table2). what I am trying to do is find all the records in table2 that are not in table1. This is the query that I am using. select * from tb

Re: Math problem

2006-06-22 Thread Brent Baisley
dollar/currency/money, call it whatever you like, but if it's got a $ in front of it, then it's a string, not a number. Your price field should have been created as a decimal. I'm guessing it's a char type. You should also set your fields to default to 0, not NULL. The problem is with your setup,

RE: Math problem

2006-06-22 Thread Jay Blanchard
[snip] It appears that mysys 4.1 does not know how to multiply a dollar amount to another number. Has anyone else seen this problem? [/snip] Your price column contains a dollar sign, making it a text field that you cannot multiply with. -- MySQL General Mailing List For list archives: http:/

Re: Math problem

2006-06-22 Thread Chris W
Karl Larsen wrote: I'm trying to multiply numbers one of which is money. The money looks like this: SELECT price FROM titles; | price | ++ | $20.00 | | $19.99 | | $7.99 | | $19.99 | | $11.95 | | $19.99 | | $14.99 | | $11.95 | | $22.95 | | $2.99 | | $10.95 | | $7.00 | | $2.99 |

Math problem

2006-06-22 Thread Karl Larsen
I'm trying to multiply numbers one of which is money. The money looks like this: SELECT price FROM titles; | price | ++ | $20.00 | | $19.99 | | $7.99 | | $19.99 | | $11.95 | | $19.99 | | $14.99 | | $11.95 | | $22.95 | | $2.99 | | $10.95 | | $7.00 | | $2.99 | | $20.95 | | NULL

RE: New to the group

2006-06-22 Thread Bartis, Robert M (Bob)
If you will excuse my ignorance. I have no immediate need for this, but have often asked what the pros/cons there are writing a WEB based interface in PHP vs. say Perl. Do you have any insight into that? Thanks Bob -Original Message- From: mos [mailto:[EMAIL PROTECTED] Sent: Thursday, J

Re: New to the group

2006-06-22 Thread mos
At 08:46 AM 6/22/2006, Nicholas Vettese wrote: Hello, My name is Nick, and I am a new MySQL user. My hope is not to become a PITA, so I will make sure that any question is straight and to the point with the information needed to answer the question. My skill in MySQL is pretty low, and I

Re: Lots of threads in "opening tables" and "closing tables" state

2006-06-22 Thread Dan Buettner
Christian, I hope raising the open_files_limit helps (I think it should). I second Brent's suggestion to enable the thread_cache. Please do report back and let us know how you fare. Dan Christian Hammers wrote: Hello On Thu, Jun 22, 2006 at 11:28:41AM -0500, Dan Buettner wrote: Christian,

Re: Lots of threads in "opening tables" and "closing tables" state

2006-06-22 Thread Dan Buettner
Christian, can you post the output of SHOW VARIABLES; and SHOW STATUS; please? I see you're servicing 761 queries per second on average, which is pretty good. However, it appears to me your server has performed over 120 million operations (Opens: 120224674) to open tables in 10 days of uptime,

Re: Lots of threads in "opening tables" and "closing tables" state

2006-06-22 Thread Brent Baisley
You should also up your thread cache, currently it's set to 0. MySQL won't reuse threads if this is set to 0. MySQL has created 13781740 new threads so far. You can change the value while the server is running (example below), but may want to also add it to your conf file. set global thread_cac

Re: Lots of threads in "opening tables" and "closing tables" state

2006-06-22 Thread Christian Hammers
Hello On Thu, Jun 22, 2006 at 11:28:41AM -0500, Dan Buettner wrote: > Christian, can you post the output of > SHOW VARIABLES; > and > SHOW STATUS; > please? Ok, is below. We're only using MyISAM although InnoDB is activated. > I see you're servicing 761 queries per second on average, which is > p

Replication / LOAD DATA FROM MASTER / secondary network interface

2006-06-22 Thread Tim Lucia
Hello List, Has anyone seen any problems using LOAD DATA FROM MASTER on a second slave using a secondary network interface? I have: mysql-master / {172.25.7.20 / eth0, 192.168.7.20 / eth1} / Red Hat EL V.4 / MySQL 5.0.22 mysql-slave1 / 172.25.1.58 / Windows XP / MySQL 5.0.18 mysql-slave2 / 19

Lots of threads in "opening tables" and "closing tables" state

2006-06-22 Thread Christian Hammers
Hello We have the problem that on one of our database server (Quad-Dualcore-Hyperthreading Xeon system with 8GB RAM) the database performance suddenly goes down and stays so for a while. There is no significant memory or CPU activity but the Load goes up to 200 which indicates to me that there mu

Re: Problems with: MySQL 5.0.21 - 64bit

2006-06-22 Thread Dan Buettner
Gabriel, in your SHOW VARIABLES, I see a handful of settings that are much, much larger than normal: | max_binlog_cache_size | 18446744073709551615 | max_join_size | 18446744073709551615 | max_seeks_for_key | 18446744073709551615 | max_write_lock_coun

Re: mysqld refuses to run on boot

2006-06-22 Thread Jay Pipes
Fredrik Andersson wrote: Both datadir and basedir is owned by mysql and the mysql group. I have hit rockbottom here it seems :( first, check the error log for mysql. Should be in the datadir, named localhost.localdomain.err I believe on RH. There will be an entry in there explaining that s

New to the group

2006-06-22 Thread Nicholas Vettese
Hello, My name is Nick, and I am a new MySQL user. My hope is not to become a PITA, so I will make sure that any question is straight and to the point with the information needed to answer the question. My skill in MySQL is pretty low, and I am looking to build a website for myself that

FreeBSD 6 and MySQL with DBs on a NAS

2006-06-22 Thread mysql-archive
Hi, I was wondering if anyone else had encountered this issue and/or come up with what needs to be done to resolve it: I currently have MySQL 5.0.22 built from ports on a FreeBSD 6.1 machine with the DB data residing on a NetApp share connected via NFS. A strange thing happens often after a f

Re: Need to speed up deletes

2006-06-22 Thread Brent Baisley
You should try deleting in smaller batches if you can. I've found things go a lot quicker doing it that way and you don't lock up your table for long durations if you want to stick with MyISAM. - Original Message - From: "mos" <[EMAIL PROTECTED]> To: Sent: Wednesday, June 21, 2006 5:5

Re: About mysqldump

2006-06-22 Thread Dilipkumar
Hi, Take the dump using --tab which will give you .txt and .sql file. Move the dump to the new version of mysql and try using load data infile '/tmp/user.txt' into table user; Jørn Dahl-Stamnes wrote: On Thursday 22 June 2006 04:00, Daniel da Veiga wrote: On 6/21/06, Jørn Dahl-Stamnes <

Re: Problems with: MySQL 5.0.21 - 64bit

2006-06-22 Thread Dilipkumar
Hi, Please let us know what all variables you have configured in your my.cnf files. what is your total size of memory in box. eg : max_connections key_buffer_size sort_buffer_size. Gabriel PREDA wrote: Hi list, Since we bought a better hardware for our dedicated MySQL Server we

Problems with: MySQL 5.0.21 - 64bit

2006-06-22 Thread Gabriel PREDA
Hi list, Since we bought a better hardware for our dedicated MySQL Server we have been running into some problems. We are using: - Fedora Core 3 - 64bit version - Kernel: 2.6.9-1.667smp - x86_64 - MySQL 5.0.21-standard - for 64bit - RAM: 4 GB - RAID 5 matrix with 3 SCSI disks at 15k rotations