Re: Need help with a "natural sort order" for version numbers and release code names

2007-10-12 Thread Adam Randall
Oh, and here's the output (Sorry): +---+-+ | releaseid | name| +---+-+ | 1 | Unspecified | | 2 | Next Patch | | 3 | LOCset | | 4 | Abashiri| |

Re: Need help with a "natural sort order" for version numbers and release code names

2007-10-12 Thread Adam Randall
Here's my full test solution: use test; drop table if exists releases; create temporary table releases ( releaseid int(10) unsigned not null auto_increment primary key, name varchar(255) )engine=myisam; insert into releases ( name ) values ( 'Unspecified' ), ( 'Next Patch' ), (

RE: Need help with a "natural sort order" for version numbers and release code names

2007-10-12 Thread Daevid Vincent
> -Original Message- > From: Jay Pipes [mailto:[EMAIL PROTECTED] > Sent: Friday, October 12, 2007 2:07 PM > To: Daevid Vincent > Cc: mysql@lists.mysql.com > Subject: Re: Need help with a "natural sort order" for > version numbers and release code names > > Daevid Vincent wrote: > >

Re: LEFT JOIN (SELECT ...) -- no joy

2007-10-12 Thread mysql
Andrew Carlson wrote: Is there a purchase order (10002) with no orders in the order_details table? No, PO 10002 is related to the order_id = 2 here: mysql> SELECT order_id, SUM(quantity * unit_price) AS subtotal -> FROM order_details GROUP BY order_id; +--+--+ | order_id |

Re: Need help with a "natural sort order" for version numbers and release code names

2007-10-12 Thread Jay Pipes
Daevid Vincent wrote: I'm trying to get some 'release/version numbers' to sort properly. mysql> SELECT ReleaseID, Name FROM releases ORDER BY Name DESC; +---+-+ | ReleaseID | Name| +---+-+ |18 | Unspecifie

Not In join query.

2007-10-12 Thread Chris W
I have 2 queries to give me a list of names. Q1: SELECT DISTINCT FName, LName FROM user u JOIN userprofile p USING ( UserID ) JOIN trainingstatus t USING ( UserID ) WHERE ProgramID =12 ORDER BY LName, FName Q2 SELECT DISTINCT FName, LName FROM namelist WHERE `Date` What I need is query that wil

Need help with a "natural sort order" for version numbers and release code names

2007-10-12 Thread Daevid Vincent
I'm trying to get some 'release/version numbers' to sort properly. mysql> SELECT ReleaseID, Name FROM releases ORDER BY Name DESC; +---+-+ | ReleaseID | Name| +---+-+ |18 | Unspecified | |20

LEFT JOIN (SELECT ...) -- no joy

2007-10-12 Thread mysql
using 5.0.24 mysql> describe order_details; ++---+--+-+-++ | Field | Type | Null | Key | Default | Extra | ++---+--+-+-++ | id | mediu

Re: open_files_limit problem.

2007-10-12 Thread B. Keith Murphy
Paul, Take a look at the ulimit command. We had a similar issue, and it turns out there are OS level per-process limits as well. We have now configured the /etc/init.d/mysql file set the ulimit to what we need. here is the snippet form the file: echo $echo_n "Starting MySQL" ulimit -n 4096

Re: Trigger

2007-10-12 Thread Martijn Tonies
>Mostly because use 2 field to represent the same data is a waste of storage i think. Oh, ok. So you're sending a non-date value and you want to transform it into an actual character presentation of a date value, but making things easier on yourself is a waste of storage. Feel free to continu jum

Re: Trigger

2007-10-12 Thread Patricio A. Bruna
Mostly because use 2 field to represent the same data is a waste of storage i think. - "Martijn Tonies" <[EMAIL PROTECTED]> escribió: > >The aplication which is writing to the database is sending the date > in unix > format. > >I can't no change that, so i suposse using a triger will help. >

Re: Trigger

2007-10-12 Thread Martijn Tonies
>The aplication which is writing to the database is sending the date in unix format. >I can't no change that, so i suposse using a triger will help. > >The application pass the 'xx.xx' value when is inserting to the table. Righto. Well, what does this mean then: >im converting the unixtime to

Re: Trigger

2007-10-12 Thread Patricio A. Bruna
The aplication which is writing to the database is sending the date in unix format. I can't no change that, so i suposse using a triger will help. The application pass the 'xx.xx' value when is inserting to the table. - "Martijn Tonies" <[EMAIL PROTECTED]> escribió: > >If i define that t

Re: Trigger

2007-10-12 Thread Martijn Tonies
>If i define that the value for the field must be varchar data type, `fecha` varchar(25) default NULL, the triger records the right date. >I think because is wrinting a string only. But if i define the field as a date data type, `fecha` date default NULL, the value writen is: 1969-31-12. I suppose

Re: Trigger

2007-10-12 Thread Patricio A. Bruna
Martijn, If i define that the value for the field must be varchar data type, `fecha` varchar(25) default NULL, the triger records the right date. I think because is wrinting a string only. But if i define the field as a date data type, `fecha` date default NULL, the value writen is: 1969-31-12. I

Re: MySQL Server not running

2007-10-12 Thread John Meyer
Given that FEHLGESCHLAGEN means "failed" and coupled with the proceding text, I would assume that you don't have mysql installed in the first place. If you are on an rpm based system, try the following: rpm -q mysql If you don't get anything back, you need to reinstall. Ananda Kumar wrote: > if

Re: MySQL Server not running

2007-10-12 Thread Ananda Kumar
if u do ps -ef | grep mysql, what do u get. regards anandkl On 10/12/07, Daniel Bau <[EMAIL PROTECTED]> wrote: > > He say he can not connect to the server --> no server is installed and no > socket is in > var/lib/mysql > > When I install it he want to start the server and say "FEHLGESCHLAG

Re: MySQL Server not running

2007-10-12 Thread Daniel Bau
He say he can not connect to the server --> no server is installed and no socket is in var/lib/mysql When I install it he want to start the server and say "FEHLGESCHLAGEN" No mysql server or manager Or can not connect to mysql.sock So he not realy install the server and say me he ha

Re: MySQL Server not running

2007-10-12 Thread Ananda Kumar
what is the error ur getting. regards anandkl On 10/11/07, Daniel Bau <[EMAIL PROTECTED]> wrote: > > Dear MySQL Support team , > > I have bis problems to upgrade my MySQL 3.23.58 Version on a Linux Red Hat > 3 system. > I nearly download all MySQL Versions (4,5,6) and try to test them but > nowb

MySQL Server not running

2007-10-12 Thread Daniel Bau
Dear MySQL Support team , I have bis problems to upgrade my MySQL 3.23.58 Version on a Linux Red Hat 3 system. I nearly download all MySQL Versions (4,5,6) and try to test them but nowbody work. I stopp my MySql Server, reinstall the old version and install the new with rpm. It never work

Re: Trigger

2007-10-12 Thread Martijn Tonies
Hi, > I have a problem with a trigger which should conver a unix timestamp to a MySQL date datatype. > The trigger works if the column is varchar, but when the column is date type, it write the date of 1969-31-12. Instead of "column", I guess you mean "value"? > Any ideas? > > > > DROP TABLE IF