0

Is there any way that we can modify the retrieved data from a database without changing the original data? Like add_filter() function in PHP.

E.g: we have a cell in the database called Gender, it has two values: 0 (male), and 1 (female). When I show the data I want to replace the 0 with the word "Male" without changing the original 0 in the database! Is it possible?

2
  • in what you are taking the data from database, data-set, list and how ?? Commented Sep 14, 2015 at 12:25
  • Dataset. in vb.net with SQL commands Commented Sep 14, 2015 at 12:33

1 Answer 1

1

Use CASE expression in select list, something like:

select case gender when 0 then 'Male'
                   when 1 then 'Female'
       end
from ...
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.