Have you tried:
select concat("blah", x, "bleh") from y group by x;
> Hi All,
>
> when I use a distinct on varchar fields, does mySQL truncate the value
> of the string to some set value.
> This two queries give me a completely different number of rows and I am
> not sure how to influence the behaviour:
>
> select distinct x from y; (many rows result)
> and
> select distinct concat("some long string",x,"some more string" from y
> (one row result)
>
> where x is a varchar(255) field.
>
> Is there any way that I can get the same results with both queries or as
> an alternative use:
>
> select concat("some long string", distinct x,"some more string") from y,
> where the problem is that distinct is not allowed in concat (as in any
> other function for that matter as I assume)
---------------------------------------------------------------------
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