MySQL Forums
Forum List  »  Newbie

Getting a blob result with order clause
Posted by: Kaushik Ghose
Date: February 20, 2005 01:41PM

Hi,

The following query

SELECT t.id, concat(replace(t.date,"-","."),".",t.session,".", lpad(t.number,2,"0")," : ",tt.name ,", ", b.band) FROM trial as t, trial_type as tt, bat as b, collection_link cl WHERE cl.collection_id = 1 and cl.trial_id = t.id and t.trial_type_id = tt.id and t.bat_id = b.id ORDER by t.bat_id

returns a blob value for the concat result (which is upon inspection, the correct ascii text I need)

while the same query without the order by clause

SELECT t.id, concat(replace(t.date,"-","."),".",t.session,".", lpad(t.number,2,"0")," : ",tt.name ,", ", b.band) FROM trial as t, trial_type as tt, bat as b, collection_link cl WHERE cl.collection_id = 1 and cl.trial_id = t.id and t.trial_type_id = tt.id and t.bat_id = b.id

returns a text value for the concat.

why ?

thanks
-kaushik

Options: ReplyQuote


Subject
Written By
Posted
Getting a blob result with order clause
February 20, 2005 01:41PM


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.