[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

Re: [firebird-support] Where condition by column number

2012-12-03 Thread Leonardo M . Ramé
On 2012-12-02 18:16:17 +0100, Thomas Steinmaurer wrote:   On Sat, Dec 1, 2012 at 8:09 AM, Leonardo M. Ramé [1][1][1]l.r...@griensu.com wrote: Hi, I'm wondering if there's a way to refer columns by number in WHERE conditions. I need this

Re: [firebird-support] Where condition by column number

2012-12-02 Thread Leonardo M . Ramé
On 2012-12-01 14:14:50 -0500, Ann Harrison wrote:   On Sat, Dec 1, 2012 at 8:09 AM, Leonardo M. Ramé [1]l.r...@griensu.com wrote: Hi, I'm wondering if there's a way to refer columns by number in WHERE conditions. I need this because I'm creating a generic method

Re: [firebird-support] Where condition by column number

2012-12-02 Thread Thomas Steinmaurer
On Sat, Dec 1, 2012 at 8:09 AM, Leonardo M. Ramé [1]l.r...@griensu.com wrote: Hi, I'm wondering if there's a way to refer columns by number in WHERE conditions. I need this because I'm creating a generic method to create where clauses for hopefully ANY

Re: [firebird-support] Where condition by column number

2012-12-02 Thread Leonardo M . Ramé
On 2012-12-02 16:59:24 +0100, Thomas Steinmaurer wrote:   On Sat, Dec 1, 2012 at 8:09 AM, Leonardo M. Ramé [1][1]l.r...@griensu.com wrote: Hi, I'm wondering if there's a way to refer columns by number in WHERE conditions. I need this because I'm

Re: [firebird-support] Where condition by column number

2012-12-02 Thread Thomas Steinmaurer
On Sat, Dec 1, 2012 at 8:09 AM, Leonardo M. Ramé [1][1]l.r...@griensu.com wrote: Hi, I'm wondering if there's a way to refer columns by number in WHERE conditions. I need this because I'm creating a generic method to create where

Re: [firebird-support] Where condition by column number

2012-12-02 Thread Thomas Steinmaurer
On Sat, Dec 1, 2012 at 8:09 AM, Leonardo M. Ramé [1][1]l.r...@griensu.com wrote: Hi, I'm wondering if there's a way to refer columns by number in WHERE conditions. I need this because I'm creating a generic method to create where

[firebird-support] Where condition by column number

2012-12-01 Thread Leonardo M . Ramé
Hi, I'm wondering if there's a way to refer columns by number in WHERE conditions. I need this because I'm creating a generic method to create where clauses for hopefully ANY query, in FreePascal. I need this: select col1, col2, colN from ... join ... where col1 = condition1, col2 =

Re: [firebird-support] Where condition by column number

2012-12-01 Thread Leonardo M . Ramé
On 2012-12-01 10:09:15 -0300, Leonardo M. Ramé wrote:   Hi, I'm wondering if there's a way to refer columns by number in WHERE conditions. I need this because I'm creating a generic method to create where clauses for hopefully ANY query, in FreePascal. I need this:

RE: [firebird-support] Where condition by column number

2012-12-01 Thread Svein Erling Tysvær
Hi, I'm wondering if there's a way to refer columns by number in WHERE conditions. I need this because I'm creating a generic method to create where clauses for hopefully ANY query, in FreePascal. I need this: select col1, col2, colN from ... join ... where col1 = condition1, col2 =

Re: [firebird-support] Where condition by column number

2012-12-01 Thread Ann Harrison
On Sat, Dec 1, 2012 at 8:09 AM, Leonardo M. Ramé l.r...@griensu.com wrote: Hi, I'm wondering if there's a way to refer columns by number in WHERE conditions. I need this because I'm creating a generic method to create where clauses for hopefully ANY query, in FreePascal What you suggest,