Does DolphinDB support the following script?
update tmp set exchangecd='XSHG' if exchangecd='SH' set exchangecd='XSHE' if exchangecd='sz'
DolphinDB does not support the IF statement, but you can use the CASE statement with WHEN...THEN..., as shown in the following script:
IF
CASE
WHEN...THEN...
UPDATE tmp SET col1 = CASE WHEN col1 = 'SH' THEN 'hello1' WHEN col1 = 'SZ' THEN 'hello2' ELSE col1END;
DolphinDB does not support the
IF
statement, but you can use theCASE
statement withWHEN...THEN...
, as shown in the following script: