K
khoaha
Thank you in advance.
This is my problem.
Assume I have a select statement SELECT Name, Gender FROM 'Database'
Name is a (varchar) and Gender is an (int)
The Gender column stored value of '1' and '0'
Now when I use the select statement to bind the value to the gridview
I wanted it to store "Male" for '1' and "Female" for '0'
Database This should be what to be store in the
gridview
abc 1 abc Male
def 0 def Female
I have tried to use the CASE statement in the select query to alter the
data. However I can only alter it to the same type 1->100 (int to int)
but cannot
alter it to a different type 1->Male (int to varchar)
Does anybody know if there is a why to do this? Alter the value type as
well as the value.
Thanks
This is my problem.
Assume I have a select statement SELECT Name, Gender FROM 'Database'
Name is a (varchar) and Gender is an (int)
The Gender column stored value of '1' and '0'
Now when I use the select statement to bind the value to the gridview
I wanted it to store "Male" for '1' and "Female" for '0'
Database This should be what to be store in the
gridview
abc 1 abc Male
def 0 def Female
I have tried to use the CASE statement in the select query to alter the
data. However I can only alter it to the same type 1->100 (int to int)
but cannot
alter it to a different type 1->Male (int to varchar)
Does anybody know if there is a why to do this? Alter the value type as
well as the value.
Thanks