This topic contains 3 replies, has 0 voices, and was last updated by BrianE 6 years, 9 months ago.
-
AuthorPosts
-
Mike Kennedy- Contributions: 0
- Level 1
- ☆
I'm trying to figure out how to get this to work.
Code:
CASE WHEN {shipaddress1} IS NULL THEN {shipaddress2} // Works
ELSE (
CASE WHEN {shipaddress1} IN 'Attn: ' THEN {shipaddress2} // Does not Work
ELSE {shipaddress1} // It allway goes here
END
)
END
If shipaddress1 has "Attn:" at the beginning, then I want to print shipaddress2 insteadThanks
This is a cached copy. Click here to see the original post. -
pcutler- Contributions: 0
- Level 1
- ☆
are you looking for
Code:
CASE WHEN {shipaddress1} LIKE 'Attn:%' THEN… -
Mike Kennedy- Contributions: 0
- Level 1
- ☆
That worked.
Thanks PCutler
Code:
CASE WHEN {shipaddress1} IS NULL THEN {shipaddress2}
ELSE (
CASE WHEN {shipaddress1} LIKE 'Attn:%' THEN {shipaddress2}
ELSE {shipaddress1}
END
)
END -
BrianE- Contributions: 0
- Level 1
- ☆
The two levels of case statements are not really needed:
Code:
CASE WHEN {shipaddress1} IS NULL THEN {shipaddress2}
WHEN {shipaddress1} LIKE 'Attn:%' THEN {shipaddress2}
ELSE {shipaddress1}
END -
AuthorPosts
You must be logged in to reply to this topic.