Re: [PHP-DB] SQL prob

2005-01-31 Thread Bobo Wieland
Thanks, but DISTINCT doesn't work... But I managed to get it to work anyway by including namn_1 NOT LIKE 'H%' in the second WHERE-clause... Micah Stevens wrote: use DISTINCT? On Sunday 30 January 2005 12:51 pm, Bobo Wieland wrote: Anyone that can help me with this one? I want this

[PHP-DB] SQL prob

2005-01-30 Thread Bobo Wieland
Anyone that can help me with this one? I want this SQL-statement to retrive only distinct values from the original table column named (not the AS stuff) ( SELECT * , namn_2 AS sec_namn, namn_1 AS one FROM sortiment WHERE namn_1 LIKE 'H%' ) UNION ( SELECT * , UPPER( namn_2 ) AS sec_namn, namn_2

Re: [PHP-DB] SQL prob

2005-01-30 Thread Micah Stevens
use DISTINCT? On Sunday 30 January 2005 12:51 pm, Bobo Wieland wrote: Anyone that can help me with this one? I want this SQL-statement to retrive only distinct values from the original table column named (not the AS stuff) ( SELECT * , namn_2 AS sec_namn, namn_1 AS one FROM sortiment

RE: [PHP-DB] SQL prob (DATE_FORMAT)

2002-07-07 Thread Russ
-mail) Subject: Re: [PHP-DB] SQL prob (DATE_FORMAT) Russ, I'm a bit of a novice, but I would have thought that the DATE_FORMAT function would only work if the field had been defined as a DATE field type. If you are storing the date as an integer eg: 20020705 (today), why not format your current