Subject | Multiple Databases, how |
---|---|
Author | lysander4445 |
Post date | 2005-03-18T12:11:11Z |
Sorry, did not find the correct recipe in Helen's book for this one:
How do I use information from different databases in on Stored Procedure?
I know that I cannot join them, I just within a loop want to fill the
row-buffer with data from different sources like this:
if (:statusvariable = '01') then
begin
select
[Database1].table_a.anyfield
from
[Database1].table_a
where :IDvariable = 'thisID';
end
if (:statusvariable = '02') then
begin
select
[Database2].table_b.anyfield
from
[Database2].table_b
where :IDvariable = 'thisID';
end
What is the correct syntax to use 2 databases in 1 procedure?
thanks in advance,
André
How do I use information from different databases in on Stored Procedure?
I know that I cannot join them, I just within a loop want to fill the
row-buffer with data from different sources like this:
if (:statusvariable = '01') then
begin
select
[Database1].table_a.anyfield
from
[Database1].table_a
where :IDvariable = 'thisID';
end
if (:statusvariable = '02') then
begin
select
[Database2].table_b.anyfield
from
[Database2].table_b
where :IDvariable = 'thisID';
end
What is the correct syntax to use 2 databases in 1 procedure?
thanks in advance,
André