Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jscot
Posting Yak Master
106 Posts |
Posted - 2011-01-14 : 22:21:39
|
I want to know where i am wrongHere is my source filed dataYNEMPTYUN DECIDEDNote:- Requirement is if the field has Y convert to 'YES', N convert to 'NO', Empty convert to 'Pending' and Un Decided should be as it asI am using Derived Column and below are function that i am using([Table1] == "Y" ? "YES" : ([Table1] == "N" ? "NO" [Table1] == " " ? "PENDING" :"")))and i map this field to my target fieldRESULT SHOULD BE:-YESNOPENDINGUN DECIDEDBut I am getting this ResultYESNOEMPTYEMPTYI want to where I am wrong. Thanks for help. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-01-16 : 06:25:19
|
are you sure its empty and not any unprintable character?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
jscot
Posting Yak Master
106 Posts |
Posted - 2011-01-19 : 00:23:43
|
yes that for sure there is empty no values |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-01-24 : 11:45:50
|
try:-([Table1] == "Y" ? "YES" : ([Table1] == "N" ? "NO" : ([Table1] == " " ? "PENDING" : [Table1])))------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|