Subject Re: [firebird-support] Re: How to get data from two different databases
Author Vishal Tiwari
Thanks.

--- On Thu, 24/12/09, emb_blaster <EMB_Blaster@...> wrote:


From: emb_blaster <EMB_Blaster@...>
Subject: [firebird-support] Re: How to get data from two different databases
To: firebird-support@yahoogroups.com
Date: Thursday, 24 December, 2009, 8:36 PM


 





--- In firebird-support@ yahoogroups. com, Vishal Tiwari <vishualsoft@ ...> wrote:
>
> Hi All,
>  
> I have two databases say DB1.fdb and DB2.fdb.
>  
> DB1.fdb contains table "Table1" and fields like EmpCode, EmpName etc.
>  
> DB2.fdb contains table "Table2" and fields like EmpCode, Year, Total_Salary  etc.
>  
> Now using these two databases and tables if i want to fetch some data like for each employee how much the total salary was for given year, then how do i get it.
>  
> I don't have any idea that how to get the data from two different databases using a single sql statement.
>  
> This is just an example i have taken.
>  
> Thanks in advance.
>  
> Vishal Tiwari
>

This cannot be done with a single sql statment in Firebird by now. In true, you cannot use a sql statment to retrieve data from another Database. But in Firebird 2.5 (that now is release Candidate) you will can select data from another database using EXECUTE STATMENT clause. Anyway, even there, I think it will not let you use only one single statment to do this like you want. More info in http://www.firebird sql.org/rlsnotes h/rlsnotes25. html#rnfb25- psql-extqry
Reminder: Uses of "in-development" versions are offtopic here.

WTH,









The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/

[Non-text portions of this message have been removed]