Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have stored procedure in MySQL and its returns a field paidStatus. I am expecting the field to return a bit value. The field paidStatus is a combination of a derived field and column value. While executing the procedure the O/P is comming as BLOB object.

declare is_excelUpload bit;
SQL
set is_excelUpload  = (select 1 from hireRequestFileUpload where jobProfileHireRequestId = jobProfileHireRequest_Id limit 1);


SQL
case when is_excelUpload =1 then 1 else paidStatus end as paidStatus 


Please suggest how to eliminate this issue, or why the datatype is getting changed.
Posted
Updated 16-May-15 5:44am
v7
Comments
Kornfeld Eliyahu Peter 13-May-15 7:38am    
How paidStatus is declared? Is it a bit?
Tijo Joseph 13-May-15 8:06am    
paidStatus is column having bit datatype
virusstorm 16-May-15 10:12am    
Is paidStatus a nullable column?
Tijo Joseph 17-May-15 13:18pm    
Yes
Herman<T>.Instance 16-May-15 11:45am    
change
<pre lang="SQL">case when is_excelUpload =1 then 1 else paidStatus end as paidStatus </pre>
to <pre lang="SQL">case when is_excelUpload =1 then 1 else 0 end as paidStatus </pre>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900