Re: Plpgsql - Custom fields Postgres 9.5

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Patrick B <patrickbakerbr(at)gmail(dot)com>
Cc: rob stone <floriparob(at)gmail(dot)com>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Plpgsql - Custom fields Postgres 9.5
Date: 2016-12-15 01:36:23
Message-ID: CAKFQuwb5664o3CpEtUo9Tn-cQCuH07kFm6VpyACmmjxC+_pOiQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wednesday, December 14, 2016, Patrick B <patrickbakerbr(at)gmail(dot)com> wrote:

>
> ' || date_start || '
>
> AND
>
> ' || date_end || '
>
> Results in this

> BETWEEN
>
> 2016-12-15
>
> AND
>
> 20160901
>
> Compared to this

> '2016-12-15'
>
> AND
>
> '20160901'
>
>
Your query has single quotes surrounding the values in the between. In the
the error output they don't. You need to modify the dynamic SQL so that
they do.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lucas Possamai 2016-12-15 01:54:16 Re: Plpgsql - Custom fields Postgres 9.5
Previous Message Adrian Klaver 2016-12-15 01:34:24 Re: Plpgsql - Custom fields Postgres 9.5