[Pgsql-ayuda] Re: [Pgsql-ayuda] ¿Cómo se come esto?

Antonio Mármol Albert toni@infurma.es
Wed, 27 Nov 2002 18:35:32 +0100


El miércoles 27 de noviembre de 2002  (13:28), Christian Gonzalez escribió:

> Hola a todos,
>     esto es fácil, es de tipo texto, y por lo tanto tienes que colocar
> comillas en la búsqueda:
>     SELECT id, marca FROM empresas WHERE id='21293';

id es de tipo entero, como indiqué en el email:

> >  id    | integer | not null default nextval('empresas_id_seq'::text)

Gracias por la ayuda.

> 
> 
> ----- Original Message -----
> From: "Antonio Mármol Albert" <toni@infurma.combios.es>
> To: <pgsql-ayuda@tlali.iztacala.unam.mx>
> Sent: Wednesday, November 27, 2002 11:22 AM
> Subject: [Pgsql-ayuda] ¿Cómo se come esto?
> 
> 
> > (Consulta 1)
> >
> > habitat=# SELECT id, marca FROM empresas WHERE marca = 'Muebles Celda';
> >   id   |     marca
> > -------+---------------
> >  21293 | Muebles Celda
> >
> >
> > (Consulta 2)
> >
> > habitat=# SELECT id, marca FROM empresas WHERE id=21293;
> >  id | marca
> > ----+-------
> > (0 rows)
> >
> >
> > (Estructura)
> >
> >  id    | integer | not null default nextval('empresas_id_seq'::text)
> >  marca | character varying(128) |
> >
> >
> > No entiendo porqué la segunda consulta no devuelve ninguna fila.
> >
> > ¿Alguna explicación? ¿Base de datos corrupta?
> >
> > Gracias
> >
> > --
> > Antonio Mármol Albert ( toni@infurma.es )
> > http://www.infurma.es
> > _______________________________________________
> > Pgsql-ayuda mailing list
> > Pgsql-ayuda@tlali.iztacala.unam.mx
> > http://tlali.iztacala.unam.mx/mailman/listinfo/pgsql-ayuda

-- 
Antonio Mármol Albert ( toni@infurma.es )
http://www.infurma.es