Hi,

I have some records that I need to group by a field.  This is easy using
group by in the sql statement.  What I happening is that I get some data
in html format that I have written a script that will extract the data I
require an dump it into a table.  Everything working fine.  The problem is
that when the data in entered into the table some fields enter with the
new line (\n).  So when I use the group by command below is the result.

mysql> select nome_hotel from hotel group by nome_hotel limit 10;
| Abou
                        Nawas Djerba |
| Abou Nawas Djerba    |
| Adams Beach          |
| Aegean
                                Village   |
| Aegean               |
| Aegean Village       |

This what I don't want since "Abou
                        Nawas Djerba" and "Abou Nawas Djerba" are the
same.  How do I get rid of the space.  I tried trim, rtrim nothing works.

Second, using the same data I get some of the hotel names in CAPS and I
need to convert it to lower and then group by.  How do I get these two
done?

Thanks

Adrian




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to