On Jan 27, 2009, at 8:56 AM, Stephen Russell wrote: > This statement is just getting one column for your export right?
Right > Take your last when as the else statement before your END. I don't see the logic. I am not saying you are wrong! I am really saying *I* don't see the logic. Besides, I *was* wrong about the length() function working with NULLs. Now the statement for this one ^&*%&*%$ export field looks like this: ------------------------------------------ CASE WHEN address1 is NULL AND length(address2)=0 AND mailcode IS NULL THEN '' WHEN address1 is NULL AND length(address2)>0 AND mailcode IS NULL THEN address2 WHEN address1 is NULL AND address2 IS NULL AND length(mailcode)>0 THEN mailcode WHEN address1 is NULL AND length(address2)=0 AND length(mailcode)=0 THEN '' WHEN length(address1)=0 AND length(address2)=0 AND length(mailcode)>0 THEN '' WHEN length(address1)=0 AND length(address2)>0 AND length(mailcode)=0 THEN address2 WHEN length(address1)=0 AND length(address2)>0 AND length(mailcode)>0 THEN concat(address2,' - ',mailcode) WHEN length(address2)=0 AND mailcode IS NULL THEN address1 WHEN length(address2)>0 AND mailcode IS NULL THEN concat (address1,'^',address2) WHEN address2 IS NULL AND length(mailcode)>0 THEN concat (address1,'^',mailcode) WHEN length(address2)=0 AND length(mailcode)=0 THEN address1 WHEN length(address2)=0 AND length(mailcode)>0 THEN concat (address1,'^',mailcode) WHEN length(address2)>0 AND length(mailcode)=0 THEN concat (address1,'^',address2) WHEN length(address2)>0 AND length(mailcode)>0 THEN concat (address1,'^',address2,' - ',mailcode) ELSE '' END as `concataddr`, ------------------------------------------ Probably some redundancy in there -- > You also have to string these together (address1,'^',address2,' - > ',mailcode) for placement into concataddr. It is, thanks. Ken _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/c842becc-737b-46a8-959b-26e1c8cfd...@information-architecture.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

