CONCAT with NOW()
Posted by:
Zeyar Htet
Date: August 06, 2008 10:40AM
Hi, not sure if this has been posted before, but I doubt it since I couldn't find it. So here is the problem...
I am performing a SELECT on the CONCAT function on a static string and NOW(). Basically something like
SELECT CONCAT('Time is: ',NOW()) AS 'Time';
this works great on the query browser and mysql commands, but when done through the MySQL Connector (5.1.4) with C++, I get the following :
Log: CALL sp_Test();
Log: STRING IS ??????????????
Now if I do this however:
DECLARE _tmp varchar(20);
SET _tmp = NOW();
SELECT CONCAT('Time is: ',_tmp) AS 'Time';
it returns
Log: CALL sp_Test();
Log: STRING IS Time is: 2008-08-06 11:37:49
which is correct... Is there some special way which CONCAT with NOW is interpreted within the connector as supposed to within MySQL itself?
Thanks
Subject
Views
Written By
Posted
CONCAT with NOW()
9416
August 06, 2008 10:40AM
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.