0 - 2 of 2 tags for decode

I've been working on this for hours!  Literally hours and I can't seem to get my statement to work.  I'm converting a decode statement. and I can get

one of them to work.  But I can't get them all to work the way they currently work in the Decode. 

 

Following are some basic scalar UDFs we've written to deal with strings of text.