79234170

Date: 2024-11-28 13:56:47
Score: 0.5
Natty:
Report link

I've tried the below, and it seems to work; but please do let me know if it's inefficient or wrong. (Bizarrely, it seems to return different results each time I run it, but I'm hoping that's an unrelated issue.)

COMPUTE keyword = 0.
IF (((CHAR.INDEX (column1,'HAT') > 0 AND (CHAR.INDEX (column1,'CHAT') < 1)) |
(CHAR.INDEX (column1, 'HOT') > 0 |
[...]
(CHAR.INDEX (column1, 'CAT') > 0)) keyword = 1.
EXECUTE.

The difference is in line 1: it now says "Return the row with 'HAT' in column1 unless that cell also contains 'CHAT'."

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: James Camien McGuiggan