Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
how can i recode a categorical textfield into a new dummy textfield?
i know how to do it with the INLINE command:
Table:
LOAD *,
Pick(Match(Status, 'DELETED', 'ERROR' ,Status), 'nein', 'nein', 'ja') as Status1;
LOAD * Inline [
Status
DELETED
ERROR
GENERATED
MOVED
PUBL_d3
PUBL_PORTAL
PUBLISH_ERROR
NEW
];
Is there a way to work with if-Statements in the load script?
Status | Status1 |
DELETED | no |
ERROR | no |
GENERATED | yes |
MOVED | yes |
PUBL_d3 | yes |
PUBL_PORTAL | yes |
PUBLISH_ERROR | yes |
NEW | yes |
if(Stats='DELETED' or Status='ERROR',NO,YES) as Status1
correct me if understand your query wrongly.
if(Stats='DELETED' or Status='ERROR',NO,YES) as Status1
correct me if understand your query wrongly.
Thank you so far. But it doesn't seem to work as intended.
"No" works and picks the right values. "Yes" doesn't work:
Is it possible that 'NEW' and 'PUBLISH_ERROR' do not (or did not) exist in the table being loaded with the attribute expression?
They could exist in another table, or they could have been added later. These tow value seem not to have a null/missing value for Status1.
Jonathan, you are absolutely right. I've checked the real value Distribution and both are not present anymore, but have been Status-values once. Good Job.