Hi Team,

I want to write below SQL with Ignite SQL case.

SELECT c.postalcode,CASE WHEN(c.postalcode is not null and
(length(c.postalcode)=5 or length(c.postalcode)=10 or
length(c.postalcode)=9) and
REGEXP_LIKE(c.postalcode,'(^\\d{5}$)|(^\\d{9}$)|(\\d{5}-\\d{4})$','i'))
THEN 1 WHEN (c.postalcode='00000' AND (length(c.postalcode)=0 or
length(c.postalcode)<5)) THEN 0      else      0   END AS col  from
customers as c join zipcodelkup as l on c.postalcode=l.postalcode;

Is this type of case statement valid in Ignite? if yes please suggest some
examples?
not able to find any examples here on the ignite documentation below
https://ignite.apache.org/docs/latest/sql-reference/system-functions

Regards
Karthik N

Reply via email to