Cannot find the right SQL dialect: "case when" .. fails [closed]

asked 2014-05-14 16:40:42 +0200

mabra gravatar image

Hello !

Though I cannot make dependend fields working - have to omit a space, if one field contains null - so, I do not have to omit the filed itself. Cocatenating fields in the true/false fields for a condition does not work.

So I thought, make a query/view and build the field completely in sql. So I have this:

"Sheet1"."NAMENSPREF,C,3" as "b", --see the data
"Sheet1"."STRASSE,C,25" as "d",
case when ("Sheet1"."NAMENSPREF,C,3" is not null) then "Name" = 'aa'
    else "Name" = 'bb'

from Sheet1;

But I am getting these errors:

SQL Status: HY000 Error code: 1000

syntax error, unexpected $end, expecting BETWEEN or IN or SQL_TOKEN_LIKE

If I do the query like this:

"Sheet1"."NAMENSPREF,C,3" as "b",
"Sheet1"."STRASSE,C,25" as "d",
case when ("Sheet1"."NAMENSPREF,C,3" is not null) then 'aa'
    else 'bb'
    end as "Name"

from Sheet1;

I get no data for the field, although I see, that this data exists.

I hope to get a little help. I am using a ODB, which i made from ODS. I cannot find which dialect is right. BTW, I tried both, hitting F5 in the designer and using sql direct.

Any help would be great.

Thanks anyway and best regards,


edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2016-02-22 16:43:57.320609