Re: syntax pb

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Marc Millas <marc(dot)millas(at)mokadb(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: syntax pb
Date: 2023-05-30 13:51:09
Message-ID: CAKFQuwYYvQQ0PCh3jQJdDKGha4wuTfCpBBj5m_AxioKgLP5PPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday, May 30, 2023, Marc Millas <marc(dot)millas(at)mokadb(dot)com> wrote:

>
> I get:
> ERROR: column "d" is of type numeric but expression is of type text
> LINE 2: Select distinct test1.t, 'abc' as b, NULL as c, NULL as d
>
> HINT: You will need to rewrite or cast the expression.
>
> Can someone give a short SQL syntax hint ?
>

https://www.postgresql.org/docs/current/sql-expressions.html#SQL-SYNTAX-TYPE-CASTS

David J.

In response to

  • syntax pb at 2023-05-30 13:45:11 from Marc Millas

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ray O'Donnell 2023-05-30 13:51:34 Re: syntax pb
Previous Message Mayer, Nicholas J 2023-05-30 13:48:10 Question - Does PostgreSQL have an Evaluation Assurance Level?