1 (edited by qwerty1 2018-05-20 07:26:24)

Topic: sql CASE WHEN

Hi
I'm trying to make sql query that will compare value of "collum1" and then insert text to "collum2". Can you please tell me, what i'm doing wrong?

SELECT * 
CASE
  WHEN "collum1" <10 THEN 'text' 
  END  "collum2"
FROM "table"

2 (edited by derek 2018-05-20 15:24:16)

Re: sql CASE WHEN

Hi,
I would do it this way (by script rather than sqlquery - see attached) but there are probably a few other ways too.
Regards,
Derek.

Post's attachments

Attachment icon qwerty.zip 336.69 kb, 653 downloads since 2018-05-20 

Re: sql CASE WHEN

thanks, you literally saved me