I would like to get the total number of records for 2 tables combined. This is as far as I got: SELECT COUNT(*) FROM TBL1 UNION SELECT COUNT(*) FROM TBL2; This...
... Am I missing something when I ask - Why not use the sub-select as the main query - to give you a list of Persona_id records you are interested in, and then...
Hi William, you can use subqueries in FB 1.0 - 1.5 SELECT (select COUNT(*) FROM TBL1) + (SELECT COUNT(*) FROM TBL2) from rdb$database; in Firebird 2 I believe...
If Beneficiarios.Persona_id is unique, then you're right in that a join could be the solution here. If it is not, whereas Personas. Persona_id is unique, then...
... Come on, you see that there are more characters than you expect. These could be characters which get striped out by the output routines. So, if you got...
Just a brief note to say RC4 is now available for download and testing. Please help us out - to make sure that these kits can be released publically in the...
Hi Carsten, ... Should be, but check to be sure. ... This is not a bug, but as designed. I agree that he could do (and should do) a better job in some...
Hi Alexandre, Based your explanation I modified to this: Select Ped.Empresa, Ped.CodPedido, coalesce((Select Sum(Case When Mov.CodProduto <> 8888888 Then...
this is (can be) the solution ... select first 1 ((SELECT COUNT(*) FROM TBL1 ) + (SELECT COUNT(*) FROM TBL2)) from tbl2 // (or tbl1) kadri. ... From:...
Kadri Izer
kadriizer@...
Dec 1, 2004 11:12 am
51633
... This is not complete different, just another field, both have an index. ... In my first message i posted the table definitions, so theoreticaly you can ...
Carsten Schäfer
ca_schaefer@...
Dec 1, 2004 11:20 am
51634
... Hi Rodrigo! I've no experience with tables this big (our tables are generally about 1-2m records), but still: Why use 12 different tables when they are...
... I suspect doing an addition of the two clauses would be more like SELECT t_apos.ID_APOS FROM t_apos JOIN t_auftrag ON f_id_auftrag = id_auftrag WHERE...
Hello, As far as I noticed FB tries to join everything together, and only then apply any rules, so after simple left (or any) join on 2 your tables, you will...
Hello everyone in my first post. I have database and now I need do a store procedure. What it must do?This is beginning of store procedure CREATE PROCEDURE...
... Many subselects can be rewritten as joins and vice versa. Most of the time, joins are much faster. This is no empiric analysis, but my very own experience....
Alexander Gräf
graef@...
Dec 1, 2004 12:46 pm
51639
Hi Carsten, ... Just another field is different enough. You can't compare apples and oranges. ... I hope you understand it's much easier posting with aliasses....
I need function,which give me one parametr,but this parametr will be searching if it is in many tables. Sorry for my english and so embroiled subject....
Hi all I am trying to use firebird in an automation environment. A set of measures taken from the field must be continuously written to the db. Each second...
... You could try to deactivate FORCED WRITES, so that the records can be cached by the file system. However, this introduces the risk of loosing data and even...
Alexander Gräf
graef@...
Dec 1, 2004 2:08 pm
51643
... If it is 24hrs work, then make 20 threads for example to do inserts of 50 records for each. (or any other desired number) If it is not 24hrs work and you...
Hi Rodrigo, ... I believe that with your sql construction firebird is going to be unable to use indexs at all. The best approach to me would be to merge all...
... Yes, the problem is, that after several hours, the queue could fill up the whole RAM -> The program fails to allocate more memory, it crashes, and data...
Alexander Gräf
graef@...
Dec 1, 2004 2:21 pm
51646
Well, It is interesting issue : if there are 20 connections, all are writing 50 records/sec, it would be much data safer than 1000 records/sec with single...
... No, because if all runs quite symmetrical, for each connection it would take exactly one second to write the 50 records. If the server crashes, the...
Alexander Gräf
graef@...
Dec 1, 2004 2:44 pm
51648
... Ok then (About forced wrties - I agree absolutely.), lets make 20 threads to write 200 records each, and lets make writes and comits every 2secs, that...