Hello friends, i am createing one function in which i am using dblink for connect two diffrenet database this is the smeple
SELECT * FROM dblink('host=localhost port=5432 dbname=DB_Client user=postgres password=sa123','select "ClientId","StreetOne","StreetTwo" from "ClientAddress"') AS c(id int,StreetOne text,StreetTwo text);
SELECT * FROM dblink('host=localhost port=5432 dbname=DB_Quotes user=postgres password=sa123','select q."QuoteId",q."CreatedDate" ,q."Description",q."RateOpportunity",(p."Qty" * p."UnitCost") Total FROM "Quote" q INNER JOIN "ProductOrservice" p ON q."QuoteId" = p."QuoteId" where q."ClientId"=1') AS c(quoteid integer,createddate character varying, description character varying, rateopportunity character varying, total integer); This both query return table but i want to combine them in one table and return as result.