Re: case statement within insert

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: tango ward <tangoward15(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: case statement within insert
Date: 2018-05-25 12:29:10
Message-ID: CAKFQuwaGKoMW6fs=10HNhj_Fqb3c+J_==cuW1D+m3fdYCrf7KQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Friday, May 25, 2018, tango ward <tangoward15(at)gmail(dot)com> wrote:

>
> WHEN code like '%%PE%%' or code like '%%NSTP%%'
>
> I am getting TypeError: not all arguments converted during string
> formatting.
>
> Any advice pls?
>

Unclear how to inject percent signs in the query string here. I'd just
avoid them and use regular expressions.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Igor Neyman 2018-05-25 13:35:59 RE: Insert data if it is not existing
Previous Message tango ward 2018-05-25 09:04:25 case statement within insert