![]() |
return conditional boolean as a field
im looking for a way to check if the NAME field is in an array, in the where clause this would look like this:
where name in ('a', 'b') but i just want it to return it as it currently is but have an extra field returned true or false (tbh it doesnt matter how its returned, it just needs to be different depending on the result) for example this code doesnt work Code:
select name, gender, (name in ('mike', 'dave')) as blnIsMikeOrDave from sometable where gender = 'm' |
I think this'll work:
Code:
SELECT |
| All times are GMT +1. The time now is 02:03 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.