Subject Odp: [firebird-support] SQL Error -104
Author liviuslivius@poczta.onet.pl
Hi,

Better will be if you include error message instead of code only
i think that problem can be with timestamp is your field date or timestamp?

And also is your case statement full? Can contain values like 0101?
Better will be using substring + PAD instead of case statement

Regards,
Karol Bieniaszewski

----- Reply message -----
Od: "Johannes Grimm johannes.grim@... [firebird-support]" <firebird-support@yahoogroups.com>
Do: <firebird-support@yahoogroups.com>
Temat: [firebird-support] SQL Error -104
Data: pt., wrz 5, 2014 10:47


 

Hi folks,

i just don't get it what the heck i'm doing wrong. I would like to have
something like that:

select ba.artno
from mov_invoices mi, bas_articles ba
where mi.invdate between '2014-05-01 00:00:00' and '2014-08-01 00:00:00'
and case
when (ba.artno like '90__') then '9000'
when (ba.artno like '80__') then '8000'
when (ba.artno like '70__') then '7000'
when (ba.artno like '60__') then '6000'
when (ba.artno like '50__') then '5000'
when (ba.artno like '40__') then '4000'
when (ba.artno like '30__') then '3000'
when (ba.artno like '20__') then '2000'
when (ba.artno like '10__') then '1000'
end

any ideas somebody?

greets johannes