MySQL Forums
Forum List  »  Newbie

CONCAT Dates returning "BLOB" or '?'
Posted by: Chris Rife
Date: July 30, 2010 08:47AM

I am trying to group some records in a few tables on the month and year.

I have a table:
Table tblshipevents
===================
idEvents, sDate, idOrder
-------------------
idEvents     INT
sDate        DATETIME
idOrder      INT

when I run:
SELECT concat(Monthname(sdate),' ',Year(sdate))
FROM
tblshipevents;
in Workbench sql editor it returns the "BLOB" icon in the query browser.



If I copy that value to notepad or a spreadsheet, the value shows as '?'.

If I run the same in the shell, I get the intended result: (added a group by to truncate, but with or without the field returns correctly...)
mysql> select concat(Monthname(sdate),' ',Year(sdate)) from tblshipevents
    -> GROUP by concat(Monthname(sdate),' ',Year(sdate));
+------------------------------------------+
| concat(Monthname(sdate),' ',Year(sdate)) |
+------------------------------------------+
| NULL                                     |
| April 2009                               |
| April 2010                               |
| August 2009                              |
| December 2009                            |
| February 2010                            |
| January 2010                             |
| July 2009                                |
| July 2010                                |
| June 2007                                |
| June 2009                                |
| June 2010                                |
| March 2010                               |
| May 2009                                 |
| May 2010                                 |
| November 2009                            |
| October 2009                             |
| September 2009                           |
+------------------------------------------+
18 rows in set (0.00 sec)


Have i done something incorrectly? I can always string the 2 values on the front-end, but would rather let mysql handle this sort of thing..



edit: Oh I forgot...
Connection Information
======================
Name:    LocalDev
Host:    127.0.0.1:3306
Server:  MySQL
Version: 5.1.48-community
User:    root



Edited 1 time(s). Last edit at 07/30/2010 08:50AM by Chris Rife.

Options: ReplyQuote


Subject
Written By
Posted
CONCAT Dates returning "BLOB" or '?'
July 30, 2010 08:47AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.