[firebird-support] RE: Possible to use FIRST 1 inside a group by?

2015-07-29 Thread Maya Opperman m...@omniaccounts.co.za [firebird-support]
Thank you for the help everyone! I think Sean's looks the most efficient, as that will only run the sub-query once. Now that I know how to use this trick, I think I could use this in quite a few other places too ;-) >Try: >SELECT > T.ID > T.GroupID > T2.FKCode > T2.Value >FROM ( >sele

RE: [firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - Using 2.5.4 FB Client to access a 1.5.3 DB database (Follow-Up)

2015-07-29 Thread Helen Borrie hele...@iinet.net.au [firebird-support]
At 08:36 a.m. 30/07/2015, 'stwizard' stwiz...@att.net [firebird-support] wrote: >The new Windows 2012 R2 64 bit server will have the 64 bit Firebird server >v2.5.4 install on it (But alternately may have Firebird 32 bit server >installed instead based on the answers given below). > >All client w

RE: [firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - Using 2.5.4 FB Client to access a 1.5.3 DB database (Follow-Up)

2015-07-29 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
> I guess all can tell I’m a little confused on if 32 bit and 64 bit Firebird > server/client can be mixed and matched for v2.5.4 and if whatever is placed > onto the work stations would be able to connect to v1.5.3 Firebird server > running on the old windows 2003 32 bit server. The Firebird serv

RE: [firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - Using 2.5.4 FB Client to access a 1.5.3 DB database (Follow-Up)

2015-07-29 Thread 'stwizard' stwiz...@att.net [firebird-support]
Thanks Neil for your reply, Thanks to all who take the time to reply to the following. I have a follow up question that goes along with this subject and of course anyone can chime in. The new Windows 2012 R2 64 bit server will have the 64 bit Firebird server v2.5.4 install on it (But

RE: [firebird-support] Simple query takes too much time

2015-07-29 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
> El 29/07/2015 02:07 p.m., 'Leyne, Sean' s...@broadviewsoftware.com > [firebird-support] escribió: > > Jorge: > > > >> Using MSAccess, a single query to this table takes an average of 14 ms. > > You think *14ms* is slow?!?!?!? > When a similar query over a table with 10 records takes 1 ms, y

Re: [firebird-support] Simple query takes too much time

2015-07-29 Thread Jorge Andrés Brugger lis...@dasu.com.ar [firebird-support]
El 29/07/2015 02:07 p.m., 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support] escribió: > Jorge: > >> Using MSAccess, a single query to this table takes an average of 14 ms. > You think *14ms* is slow?!?!?!? When a similar query over a table with 10 records takes 1 ms, yes, I think i

Re: [firebird-support] Possible to use FIRST 1 inside a group by?

2015-07-29 Thread setysvar setys...@gmail.com [firebird-support]
>Hi, > >I’ve got quite a tricky SQL query (well, at least for me it is, I’m hoping someone may have done this before) > >Here’s a simplified example of what I’m trying to do: > >I have a table with > >IDGroupID FKCode Value >1 1 ABC

RE: [firebird-support] RE: Possible to use FIRST 1 inside a group by?

2015-07-29 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
> This is solution: > select * from tabella A where Group_ID in (Select min(Group_ID) in tabella B > where B.ID=A.ID); Are you sure that works? It doesn't see to answer Maya original question. It also would read n^2 rows from the table. Sean > > ---Messaggio originale--- > > Da:

Rif: [firebird-support] RE: Possible to use FIRST 1 inside a group by?

2015-07-29 Thread 'Raffaele Confalone' r.confal...@libero.it [firebird-support]
This is solution: select * from tabella A where Group_ID in (Select min(Group_ID) in tabella B where B.ID=A.ID); ---Messaggio originale--- Da: 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support] Data: 29/07/2015 18.59.03 A: firebird-support@yahoogroups.com Oggetto: [firebird-su

RE: [firebird-support] Simple query takes too much time

2015-07-29 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
Jorge: > Using MSAccess, a single query to this table takes an average of 14 ms. You think *14ms* is slow?!?!?!? > SELECT "GTIN" ,"ACTIVO" FROM "TRAZABILIDAD_MEDICAMENTOS" WHERE > ("GTIN" > = ?) > ^^ > ^ > PLAN (TRAZA

[firebird-support] RE: Possible to use FIRST 1 inside a group by?

2015-07-29 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
Maya, > Might not be the most efficient method, but this works: Unfortunately, it is least efficient method -- you will read each table row n^2 times Try: SELECT T.ID T.GroupID T2.FKCode T2.Value FROM ( select MIN (ID) as ID, GroupID from MyTable GROUP BY GroupID ) T JO

[firebird-support] Simple query takes too much time

2015-07-29 Thread Jorge Andrés Brugger lis...@dasu.com.ar [firebird-support]
I´ve a medium-sized DB. Some tables have millions of records, but one in particular has just 7100 Table DDL follows: CREATE TABLE TRAZABILIDAD_MEDICAMENTOS ( GTIN D_GTIN NOT NULL /* D_GTIN = DECIMAL(14,0) */, FECHA_ALTA D_FECHA /* D_FECHA = DATE */, ACTIVO D_LOGICO DEFAULT 0 /

[firebird-support] RE: Possible to use FIRST 1 inside a group by?

2015-07-29 Thread Maya Opperman m...@omniaccounts.co.za [firebird-support]
>I've got quite a tricky SQL query (well, at least for me it is, I'm hoping >someone may have done this before) >Here's a simplified example of what I'm trying to do: >I have a table with IDGroupID FKCode Value 1 1

Rif: [firebird-support] Possible to use FIRST 1 inside a group by?

2015-07-29 Thread 'Raffaele Confalone' r.confal...@libero.it [firebird-support]
This is solution: select * from tabella A where Group_ID in (Select min(Group_ID) in tabella B where B.ID=A.ID); ---Messaggio originale--- Da: Maya Opperman m...@omniaccounts.co.za [firebird-support] Data: 29/07/2015 13.49.41 A: firebird-support@yahoogroups.com Oggetto: [firebird

[firebird-support] Possible to use FIRST 1 inside a group by?

2015-07-29 Thread Maya Opperman m...@omniaccounts.co.za [firebird-support]
Hi, I've got quite a tricky SQL query (well, at least for me it is, I'm hoping someone may have done this before) Here's a simplified example of what I'm trying to do: I have a table with IDGroupID FKCode Value 1 1

R: [firebird-support] CAST CHAR to INTEGER

2015-07-29 Thread 'palbe...@libero.it' palbe...@libero.it [firebird-support]
I'm sorry, I understood... it work! Messaggio originale Da: firebird-support@yahoogroups.com Data: 29/07/2015 11.20 A: Ogg: [firebird-support] CAST CHAR to INTEGER Hi all, how can I make this cast in Firebrid 2.5.4 (if is it po

[firebird-support] CAST CHAR to INTEGER

2015-07-29 Thread 'palbe...@libero.it' palbe...@libero.it [firebird-support]
Hi all, how can I make this cast in Firebrid 2.5.4 (if is it possible?) DECLARE VARIABLE QTA CHAR (5);DECLARE VARIABLE XYZ INTEGER; XYZ = cast(rtrim(ltrim(QTA))) as integer; Let me know, best regardsAlpe

RE: [firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - Using 2.5.4 FB Client to access a 1.5.3 DB database

2015-07-29 Thread 'Neil Pickles' neil.pick...@csy.co.uk [firebird-support]
Hi Mike, I don’t have direct experience of using FB Client v2.5 to access v1.5 databases but my understanding is that it should work okay for you. We certainly access v2.1 databases with the v2.5 client okay and accessed v1.5 databases with the v2.1 client without issue. From what I hav