Board index » delphi » Beginner question: SELECT with two databases??

Beginner question: SELECT with two databases??

Hello,

i am fairly new to interbase and have the following question :

How can i select rows from different GDB-files in a single select
statement??

I have a stored procedure in "File1.gdb" and want to select some rows from
table1 in "File2.GDB" in that procedure.

Is that possible?

Thanks,
Ralf

 

Re:Beginner question: SELECT with two databases??


Quote
Ralf Kaiser wrote:

> How can i select rows from different GDB-files in a single select
> statement??

> I have a stored procedure in "File1.gdb" and want to select some rows from
> table1 in "File2.GDB" in that procedure.

> Is that possible?

        No.

        HTH,

        -Craig

--
Craig Stuntz (TeamB)       Senior Developer, Vertex Systems Corp.
Delphi/InterBase weblog:   http://delphi.weblogs.com
Use Borland servers; posts via others are not seen by TeamB.
For more info, see http://www.borland.com/newsgroups/genl_faqs.html

Re:Beginner question: SELECT with two databases??


Yes you can

Running a select statement from a paradox database will work.

select DB1.Field1, DB2.Field2 from ":Database1:Table1"
DB1,":Database2:Table1" DB2
where DB1.Field1 = DB2.Field2

format is ":database name:tablename"

try that.  It is limiting, and slow, as it writes to a paradox table before
it displays the results, but it does work

Quote
"Ralf Kaiser" <ralf.kai...@wtal.de> wrote in message

news:3aca2e1a_2@dnews...
Quote
> Hello,

> i am fairly new to interbase and have the following question :

> How can i select rows from different GDB-files in a single select
> statement??

> I have a stored procedure in "File1.gdb" and want to select some rows from
> table1 in "File2.GDB" in that procedure.

> Is that possible?

> Thanks,
> Ralf

Re:Beginner question: SELECT with two databases??


I think the original question was Interbase related.

Regards
Thomas Steinmaurer
IB LogManager - The Logging Tool for Interbase
http://www.equitania.de/interbase/iblogmanager/start.htm (German)
http://www.equitania.de/interbase/iblogmanager/default.htm (English)
Subscribe the IBLogManager forum:
http://www.egroups.com/subscribe/iblogmanager

"Daniel Comrie" <Dan...@Redpoint.co.za> schrieb im Newsbeitrag
news:3acc30f7_1@dnews...

Quote
> Yes you can

> Running a select statement from a paradox database will work.

> select DB1.Field1, DB2.Field2 from ":Database1:Table1"
> DB1,":Database2:Table1" DB2
> where DB1.Field1 = DB2.Field2

> format is ":database name:tablename"

> try that.  It is limiting, and slow, as it writes to a paradox table
before
> it displays the results, but it does work

> "Ralf Kaiser" <ralf.kai...@wtal.de> wrote in message
> news:3aca2e1a_2@dnews...
> > Hello,

> > i am fairly new to interbase and have the following question :

> > How can i select rows from different GDB-files in a single select
> > statement??

> > I have a stored procedure in "File1.gdb" and want to select some rows
from
> > table1 in "File2.GDB" in that procedure.

> > Is that possible?

> > Thanks,
> > Ralf

Re:Beginner question: SELECT with two databases??


Quote
Daniel Comrie wrote:

> Running a select statement from a paradox database will work.

        His question pertained to stored procs.  You cannot do what he asks.

        -Craig

--
Craig Stuntz (TeamB)       Senior Developer, Vertex Systems Corp.
Delphi/InterBase weblog:   http://delphi.weblogs.com
Use Borland servers; posts via others are not seen by TeamB.
For more info, see http://www.borland.com/newsgroups/genl_faqs.html

Re:Beginner question: SELECT with two databases??


Hello,

Quote

>    His question pertained to stored procs.  You cannot do what he asks.

And, is posible to do this in a scritp to execute it after with
IBConsole ?

Thanks in advance.

Pedro Arreitunandia.

Re:Beginner question: SELECT with two databases??


Quote
Pedro_Arreitunan...@fmh.es wrote:

> >       His question pertained to stored procs.  You cannot do what he asks.

> And, is posible to do this in a scritp to execute it after with
> IBConsole ?

        IBConsole has no features for JOINing tables from multiple databases.

        -Craig

--
Craig Stuntz (TeamB)       Senior Developer, Vertex Systems Corp.
Delphi/InterBase weblog:   http://delphi.weblogs.com
Use Borland servers; posts via others are not seen by TeamB.
For more info, see http://www.borland.com/newsgroups/genl_faqs.html

Other Threads