Hi,

  Trying to get a simple CASE expression in my SELECT statement

I want the following:


select case some_bool 
       when true then 'true'
       else 'false' end
          

My java looks like:

DSL.decode().value(someBool).when(Boolean.FALSE, "true").otherwise("false");

But the SQL it generates is 

select   case when some_bool is not distinct from true then 'true'
       when some_bool is not distinct from false then 'false'
  end

What's up with the "not distinct from" syntax?

I'm using PostGreSQL but I'm also using Redshift. PostGreSQL is ok with 
this but Redshift barfs :(

Any suggestions?

Thanks,
Max

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to