Skip navigation links

MySQL Forums :: C#, Mono, .Net :: Create bool/tinyint(1) in Select of Procedure for DataViewCheckboxColumn in C#!?


Advanced Search

Create bool/tinyint(1) in Select of Procedure for DataViewCheckboxColumn in C#!?
Posted by: Christian Leder ()
Date: October 05, 2012 12:56AM

Hello

I need to generated a column as bool / tinyint(1) in a select,
so the column will be displayed in my datagrid as checkbox.

I manage not to generate such a data type.
Is there a solution?

As an example:

CREATE PROCEDURE `myTest`()
BEGIN

Select
PK, FK .....
(case when PK_xyz is null then 1 else 0 end) as IsNew, -- Here bool / tinyint(1) needed
from TableXy
left join xyz ....
;
END


I have try different variants with Cast, Convert, bit ... but not brought the desired success.

Is there a solution to the problem?

Thank you an greetings
Christian



Edited 1 time(s). Last edit at 10/05/2012 12:59AM by Christian Leder.

Options: ReplyQuote


Subject Written By Posted
Create bool/tinyint(1) in Select of Procedure for DataViewCheckboxColumn in C#!? Christian Leder 10/05/2012 12:56AM
Re: Create bool/tinyint(1) in Select of Procedure for DataViewCheckboxColumn in C#!? Fernando Gonzalez 10/23/2012 05:29PM


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.