[Pgsql-ayuda] select

Paola Paredes A lista_linux@logros.cl
Mon, 28 Apr 2003 13:05:52 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_000C_01C30D86.E5CCF860
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hola a todos, mi duda es bien peque=F1a

Quiero seleccionar todas las columnas en donde el campo sucursal =
contenga la variable paso al medio.
paso=3D5;
SELECT descrip FROM Usuarios where sucursal =3D '%" & Paso & "%' order =
by descrip

pero no recoge nada...

si la consulta la hago en psql:=20
SELECT descrip FROM Usuarios where sucursal =3D '%5%' order by descrip =
tampoco encuentra nada

Mi duda es como se coloca el % o si se utiliza otro comod=EDn

Gracias=20

Paola Paredes


------=_NextPart_000_000C_01C30D86.E5CCF860
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 content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hola a todos, mi duda es bien =
peque=F1a</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Quiero seleccionar todas las columnas =
en donde el=20
campo sucursal contenga&nbsp;la variable paso al medio.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>paso=3D5;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>SELECT descrip FROM Usuarios where =
sucursal =3D '%"=20
&amp; Paso &amp; "%' order by descrip</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>pero no recoge nada...</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>si la consulta la hago en psql: =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>SELECT descrip FROM Usuarios where =
sucursal =3D '%5%'=20
order by descrip tampoco encuentra nada</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>Mi duda es como se coloca el % o si se utiliza otro comod=EDn</DIV>
<DIV>&nbsp;</DIV>
<DIV>Gracias </DIV>
<DIV>&nbsp;</DIV>
<DIV>Paola Paredes</DIV></FONT></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_000C_01C30D86.E5CCF860--