OTRO Re: [Pgsql-ayuda] Se puede hacer DBLink?

sandrigo lezcano psql@msa.com.py
Wed, 11 Jun 2003 13:37:08 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_0148_01C3301E.8DCC8990
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

otro

----- Original Message -----=20
> From: Carlos Pe=F1aranda=20
> Sent: Wednesday, June 11, 2003 5:38 PM
> Subject: [Pgsql-ayuda] Se puede hacer DBLink?


Exemplo:
-----------------------
tabela1 (codigo integer, nome varchar(50)) //na base1
tabela2 (codigo integer, endereco varchar(50)) //na base 2

SELECT tabela1.codigo, tabela1.nome, tabela2.endereco
 FROM tabela1,
dblink('dbname=3Dbase2', 'select codigo, endereco from tabela2')
   AS tabela2(codigo integer, endereco varchar(50))
 WHERE tabela1.codigo =3D tabela2.codigo
---------------------------------------


------=_NextPart_000_0148_01C3301E.8DCC8990
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>otro</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV style=3D"FONT: 10pt arial"><FONT face=3D"Courier New">&gt; =
</FONT>From: <A=20
title=3Dcalupe@yahoo.com href=3D"mailto:calupe@yahoo.com">Carlos =
Pe=F1aranda</A>=20
</DIV>
<DIV style=3D"FONT: 10pt arial">&gt; Sent: Wednesday, June 11, 2003 5:38 =
PM</DIV>
<DIV style=3D"FONT: 10pt arial">&gt; Subject: [Pgsql-ayuda] Se puede =
hacer=20
DBLink?</DIV></FONT></DIV>
<DIV><FONT size=3D2><FONT size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2><FONT size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2><FONT =
size=3D3>Exemplo:<BR>-----------------------<BR>tabela1=20
(codigo integer, nome varchar(50)) //na base1<BR>tabela2 (codigo =
integer,=20
endereco varchar(50)) //na base 2<BR><BR>SELECT tabela1.codigo, =
tabela1.nome,=20
tabela2.endereco<BR>&nbsp;FROM tabela1,<BR>dblink('dbname=3Dbase2', =
'select=20
codigo, endereco from tabela2')<BR>&nbsp;&nbsp; AS tabela2(codigo =
integer,=20
endereco varchar(50))<BR>&nbsp;WHERE tabela1.codigo =3D=20
tabela2.codigo<BR>---------------------------------------</FONT><BR></FON=
T></DIV></BODY></HTML>

------=_NextPart_000_0148_01C3301E.8DCC8990--