Re: [firebird-support] 'Invalid expression' error in GROUP BY when field based on a SQL statement is used in SELECT field list

2016-01-18 Thread 'Arno Brinkman' fbsupp...@abvisie.nl [firebird-support]
May be this is what you want: SELECT ReceiptID, (SELECT FIRST 1 S.Service FROM ReceiptLine RLF JOIN Service S ON (S.ServiceID = RLF.ServiceID) WHERE RLF.ReceiptLineID = MIN(RL.ReceiptLineID) ) AS Service, SUM(Qty*Cost) Price FROM ReceiptLine RL GROUP BY ReceiptID

Re: [firebird-support] 'Invalid expression' error in GROUP BY when field based on a SQL statement is used in SELECT field list

2016-01-18 Thread 'Marcin Bury' marcin.b...@studio-delfi.pl [firebird-support]
Steve Try : Grou by 1,2 instead of GROUP BY ReceiptID, Service Marcin -- Wiadomość oryginalna -- Od: "stevef...@yahoo.com [firebird-support]" Do: firebird-support@yahoogroups.com Wysłano: 18.01.2016 09:50:08 Temat: [firebird-support] 'Invalid

Re[2]: [firebird-support] 'Invalid expression' error in GROUP BY when field based on a SQL statement is used in SELECT field list

2016-01-18 Thread 'Marcin Bury' marcin.b...@studio-delfi.pl [firebird-support]
Of cousre it should be Group by 1, 2 Fingers too quick - sorry Marcin -- Wiadomość oryginalna -- Od: "'Marcin Bury' marcin.b...@studio-delfi.pl [firebird-support]" Do: firebird-support@yahoogroups.com; firebird-support@yahoogroups.com Wysłano:

[firebird-support] 'Invalid expression' error in GROUP BY when field based on a SQL statement is used in SELECT field list

2016-01-18 Thread stevef...@yahoo.com [firebird-support]
This error: "Dynamic SQL Error SQL error code = -104 Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause)" is returned by the following SQL: SELECT ReceiptID, ( SELECT FIRST 1 S.Service FROM Service

Re: [firebird-support] 'Invalid expression' error in GROUP BY when field based on a SQL statement is used in SELECT field list

2016-01-18 Thread stevef...@yahoo.com [firebird-support]
It does not work. Same error.

Re: [firebird-support] 'Invalid expression' error in GROUP BY when field based on a SQL statement is used in SELECT field list

2016-01-18 Thread stevef...@yahoo.com [firebird-support]
Yes, it worked. Thank you!

[firebird-support] 32 bit vs 64 bit arthmetic

2016-01-18 Thread Tim Ward t...@telensa.com [firebird-support]
So I've got this stored procedure which takes DECIMAL(18,6) parameters and returns DECIMAL(18,12) results, and internally copies stuff into and out of DOUBLE PRECISION variables which it uses to call a UDF to do the actual calculations. And the results are different (in the 8th decimal place

Re: [firebird-support] 32 bit vs 64 bit arthmetic

2016-01-18 Thread Tim Ward t...@telensa.com [firebird-support]
On 18/01/2016 17:34, 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support] wrote: Tim, > So I've got this stored procedure which takes DECIMAL(18,6) parameters and > returns DECIMAL(18,12) results, and internally copies stuff into and out of > DOUBLE PRECISION variables which it uses

RE: [firebird-support] 32 bit vs 64 bit arthmetic

2016-01-18 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
Tim, > So I've got this stored procedure which takes DECIMAL(18,6) parameters and > returns DECIMAL(18,12) results, and internally copies stuff into and out of > DOUBLE PRECISION variables which it uses to call a UDF to do the actual > calculations. > > And the results are different (in the 8th