From: | Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com> |
---|---|
To: | Leonardo M(dot) Ramé <l(dot)rame(at)griensu(dot)com> |
Cc: | PostgreSql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Column does not exists? |
Date: | 2015-03-26 17:17:07 |
Message-ID: | CAG7mmox3maN7x8mDLhDwqpYBDfzWjybQDaV2OV-gp3Ni_vVasA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
[Sent through mobile]
On Mar 26, 2015 10:43 PM, Leonardo M. Ramé <l(dot)rame(at)griensu(dot)com> wrote:
>
> Ok, I have this table:
>
> CREATE TABLE sessions
> (
> "SESSIONID" integer NOT NULL,
> "SESSIONTIMESTAMP" character varying(45) NOT NULL,
> "SESSIONDATA" character varying(200) DEFAULT NULL::character varying,
> CONSTRAINT sessions_pkey PRIMARY KEY ("SESSIONID")
> )
>
> Now, when I do:
>
> DELETE From sessions WHERE SESSIONTIMESTAMP < '2010-01-01 10:02:02'
>
Use this query:
DELETE FROM sessions WHERE " SESSIONTIMESTAMP" < '2010-01-01
10:02:02'::timestamp;
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB (Software Architect)
> I get:
>
> ERROR: column "sessiontimestamp" does not exist
> LINE 1: DELETE From sessions WHERE SESSIONTIMESTAMP < '2010-01-01 10...
> ^
> ********** Error **********
>
> ERROR: column "sessiontimestamp" does not exist
> SQL state: 42703
> Character: 28
>
> But if I do:
>
> DELETE From sessions WHERE "SESSIONTIMESTAMP" < '2010-01-01 10:02:02'
>
> It DOES work.
>
> Why the db doesn't recognize the name of the table without quotes?.
>
> Regards,
> --
> Leonardo M. Ramé
> Medical IT - Griensu S.A.
> Av. Colón 636 - Piso 8 Of. A
> X5000EPT -- Córdoba
> Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
> Cel.: +54 9 (011) 40871877
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2015-03-26 17:18:54 | Re: Column does not exists? |
Previous Message | Leonardo M. Ramé | 2015-03-26 17:12:36 | Column does not exists? |