View Single Post
  #24 (permalink)  
Old 08-09-2007, 08:24 AM
Murali Murali is offline
D-Web Master
 
Join Date: Feb 2007
Location: India-Chennai.
Posts: 386
Murali is on a distinguished road
Send a message via AIM to Murali
Default Re: Use on group_concat

Quote:
Originally Posted by Murali View Post
Hi Priyan,

Found a new one, check this out.

In MYSQL

mysql> SELECT myfield FROM test_cast;


SELECT CAST(GROUP_CONCAT(myfield)AS BINARY) FROM test_cast;



In ORACLE


SELECT CAST('123'AS INTEGER) AS VAL FROM DUAL;


SELECT CAST('123,ABCD'AS INTEGER) AS VAL FROM DUAL;



Seems to be CAST Functionality differs with using GROUP_CONCAT() Function in MYSQL.
When i use
Code:
mysql> SELECT GROUP_CONCAT(CAST(MyTable_Id AS BINARY)),GROUP_CONCAT(CAST(MyTable_Value AS BINARY)) FROM MyTable;
This returns the recordset but with warnings !!!!!

Code:
 mysql> show warnings;
+---------+------+--------------------------------------+
| Level   | Code | Message                              |
+---------+------+--------------------------------------+
| Warning | 1260 | 1 line(s) were cut by GROUP_CONCAT() |
+---------+------+--------------------------------------+
1 row in set (0.00 sec)
Could i know is that any limitations for GROUP_CONCAT() and how to overcome it?
__________________
-Murali..
Reply With Quote