What I'm trying to do is:
If the 3 first character of H_SUPPLIERID1 = ‘FOU’ then H_SUPPLIERID1 else H_SUPPLIERID1 without the 3 first character
Ex : If ‘FOU_105758’ then ‘FOU_105758’
If ‘55_FOU_105758’ then ‘FOU_105758’
(H_CODE_SOCIETE) + '_' + (H_SUPPLIERID1) as CSUSUPID,
(H_CODE_SOCIETE) + '_' + (H_CODE_SECTEUR) as IDCAPLAN,
case when index(mid([H_SUPPLIERID1],3,1) '_')=0 then [H_SUPPLIERID1] else mid([H_SUPPLIERID1], 3) end as [SupplierId]
The error message says there maybe a "with" or parenthesis missing with the index function.
I'd be greaful for any help.