[firebird-support] where condition

2014-08-14 Thread 'checkmail' check_m...@satron.de [firebird-support]
Hello, 1st, the following condition does not work unfortunately. (call a stored procedure in the where-condition in a coalesce..) and d.bsnr = coalesce(select ag from p_getmaxag(:teilenr,:typ,1),d.bsnr) and d.bsnr coalesce (select ag from p_getmaxag(:teilenr,:typ,2),100) I have some

AW: [firebird-support] where condition

2014-08-14 Thread 'checkmail' check_m...@satron.de [firebird-support]
This works: and (d.bsnr = coalesce((select ag from p_getmaxag(a.teilenr,:typ,1)),d.bsnr)) but how can I get the records without a bsnr, without an workstep, no record in the table d.bsnr..) Thanks Hello, 1st, the following condition does not work unfortunately. (call a stored

Re: [firebird-support] where condition

2014-08-14 Thread Thomas Beckmann thomas.beckm...@assfinet.de [firebird-support]
and coalesce(d.bsnr, -1) = coalesce((select ag from p_getmaxag(a.teilenr,:typ,1)),d.bsnr,-1) seem to be a possible, but probably not very performant approach. Doing a left join with the procedure in case the stuff before your leading and holds true could be a solution... Thomas Am 14.08.2014

[firebird-support] Date Literals

2014-08-14 Thread Lutz Kutscher grenzhan...@yahoo.com [firebird-support]
Hi, I'm in the progress of converting an existing application from Sybase SQL (11.0.3 - from the stoneage) to Firebird. From Sybase (as well as some other databases I work with) I'm used to entering date literals as 'mmdd'. I keep getting Overflow occured during data type conversion. Is

[firebird-support] Date literals

2014-08-14 Thread grenzhan...@yahoo.com [firebird-support]
Hi, I'm in the progress of converting an existing application from Sybase SQL (11.0.3 - from the stoneage) to Firebird.From Sybase (as well as some other databases I work with) I'm used to entering date literals as 'mmdd'.I keep getting Overflow occured during data type conversion.Is it

Re: [firebird-support] Date Literals

2014-08-14 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 14-8-2014 10:29, Lutz Kutscher grenzhan...@yahoo.com [firebird-support] wrote: (3rd try. Sending to newsgroup gmane.comp.db.firebird.user or sending via yahoo's New Topic button didn't seem to work - or am I just too impatient?) This mailinglist is moderated. So your message might not show

Re: [firebird-support] Date literals

2014-08-14 Thread marcus mar...@antiphasis.net [firebird-support]
grenzhan...@yahoo.com [firebird-support] wrote: Hi, I'm in the progress of converting an existing application from Sybase SQL (11.0.3 - from the stoneage) to Firebird.From Sybase (as well as some other databases I work with) I'm used to entering date literals as 'mmdd'.I keep getting

Re: [firebird-support] Date literals

2014-08-14 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 14-8-2014 10:17, grenzhan...@yahoo.com [firebird-support] wrote: Hi, I'm in the progress of converting an existing application from Sybase SQL (11.0.3 - from the stoneage) to Firebird.From Sybase (as well as some other databases I work with) I'm used to entering date literals as

RE: [firebird-support] Date literals

2014-08-14 Thread 'Edward Mendez' emendez...@nc.rr.com [firebird-support]
Lutz, The following Format ‘-MM-dd’ should work. Select CAST( LEFT( '20140814',4) ||'-'|| substring('20140814' from 5 for 2) ||'-'||RIGHT('20140814',2) as DATE) from RDB$DATABASE In the past I had some obstacles converting datetime values from another source to the latest Firebird