Need CASE WHEN help

Can't seem to get the syntax right ....ugh! This is being used to build an XML file in case one wonders.

CASE A0600A WHEN '000000000' THEN '^' ELSE CASE A0600A IS NULL THEN '^' ELSE CASE A0600A WHEN '' THEN '^' ELSE A0600A END END END

If A0600A is "000000000", is null, or is blank then I want a '^' otherwise what ever the value of A0600A.

A0600A is a VARCHAR data type by the way.

Like this:

CASE 
	WHEN A0600A IS NULL OR A0600A = '000000000' OR A0600A = '' THEN '^'
	ELSE A0600A
END

case when A0600A = '000000000' or A0600A is null or A0600A = '' then '^'
else A0600A
end

Need the sniped icon!

:sniped:

Press colon and start typing the first letters (sn...) and you will see it. Took Graz explaining it to me in detail for me to figure that out!!

1 Like

Thank you both!! That did it.