Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have this field called LEVEL3. Basically some of them contain values and some do not. I only want to load those that contain values and therefore as you can see the code below, I have the logical operator AND LEVEL <> ' '. However, this does not work. How do I go about doing this?
IF(LEVEL2 = '16.29', LEVEL2, IF(LEVEL2 = '16.31', LEVEL2, IF(LEVEL2 = '16.30' AND LEVEL3 <> ' ', LEVEL2, LEVEL1))) AS LEVEL4,
Assuming your IF-Statement is correct, have you tried Len(Trim(FIELD)) > 0?
IF(LEVEL2 = '16.29', LEVEL2, IF(LEVEL2 = '16.31', LEVEL2, IF(LEVEL2 = '16.30' AND LEN(TRIM(LEVEL3)) > 0 , LEVEL2, LEVEL1))) AS LEVEL4,
Hi,
try With this:
IF(LEVEL2 = '16.29', LEVEL2, IF(LEVEL2 = '16.31', LEVEL2, IF(LEVEL2 = '16.30' AND (len(LEVEL3 > '0 '), LEVEL2, LEVEL1))) AS LEVEL4,
if you want to reduce the data then directly add a condition in the script
where
len(Trim(LEVEL))>0
OR
len(Trim(LEVEL))>0