Re: [firebird-support] What the best way to to join 2 tables accross 2 databases ?

2012-03-19 Thread Alexandre Benson Smith
Em 19/3/2012 00:15, Helen Borrie escreveu:
 At 02:19 PM 19/03/2012, Alexandre Benson Smith wrote:

 You can do cross database joins using execute statement in FB 2.5.
 It's true that you can perform DML in an external database from within a PSQL 
 module in v.2.5, using the EXECUTE STATEMENT extensions.  But, no, you can't 
 do cross-database joins in Firebird at all.  It won't happen until Firebird 
 supports database namespaces, which is not yet.

 ./heLen



Helen,

Thanks for the clarification... I'm not using 2.5 yet, but I recall to 
take a look on this feature (cross database DML), Perhaps I did an SP to 
check on another database... I will look for the test I did.

To the OP: Sorry for the misinformation


Re: [firebird-support] What the best way to to join 2 tables accross 2 databases ?

2012-03-19 Thread Carlos H. Cantu
ABS Thanks for the clarification... I'm not using 2.5 yet, but I recall to
ABS take a look on this feature (cross database DML), Perhaps I did an SP to
ABS check on another database... I will look for the test I did.

What can be done now is a workaround to simulate a cross-db-query,
using a combination of execute statement and Global Temporary Tables.
Not so easy as if cross-db-queries were supported natively, but...

Carlos
Firebird Performance in Detail - http://videos.firebirddevelopersday.com
www.firebirdnews.org - www.FireBase.com.br



Re: [firebird-support] What the best way to to join 2 tables accross 2 databases ?

2012-03-18 Thread Alexandre Benson Smith
Em 18/3/2012 16:59, nathanelrick escreveu:
 hello,

 What the best way to to join 2 tables accross 2 databases ?

 actually i do on the 1rt database a select First 100 ID from myTable1 where 
 ... and in the seconde database select * from MyTable2 where ID in 
 (id_we_retrieve_from_the_first_select)

 but the problem, the select * from MyTable2 where ID in 
 (id_we_retrieve_from_the_first_select) is very slow, especially on the 
 prepare :(

 is their any better way ?


You can do cross database joins using execute statement in FB 2.5.

Take a look on the release notes.

see you !