agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Andreas Joseph Krogh <andreas@visena.com>
To: pgsql-sql@lists.postgresql.org
Subject: Sv: Like Command returning wrong result set
Date: Thu, 5 Aug 2021 16:04:24 +0200 (CEST)
Message-ID: <VisenaEmail.188.af6da13ea9c4fbc4.17b16a0cab8@tc7-visena> (raw)
In-Reply-To: <CH0PR12MB5105EEAFE0AF3085B4F1095FD2F29@CH0PR12MB5105.namprd12.prod.outlook.com>
References: <CH0PR12MB5105EEAFE0AF3085B4F1095FD2F29@CH0PR12MB5105.namprd12.prod.outlook.com>
På torsdag 05. august 2021 kl. 16:00:38, skrev Tchouante, Merlin <
mtchouan@umaryland.edu <mailto:mtchouan@umaryland.edu>>:
Hello group,
I’m writing a script and a bit confused on the results with the like command.
gm.title like 'CP_%'
The above command gives me records with titles like CP_40, CP_2, CP_23, etc.
gm.title like '%_CT'
The above command give me records with tiles like Quiz: RadiInterpretation w/
CBCT.
I was expecting it to return titles that contained *_CT, i.e. FX_CT or DR_CT.
It’s as if it’s ignoring the underscore the way it would do if you were using
‘%CT’. Does it ignore the underscore when it’s right after the ‘%’?
* Percent sign ( %) matches any sequence of zero or more characters.
* Underscore sign ( _) matches any single character.
--
Andreas Joseph Krogh
Message-ID: <VisenaEmail.188.af6da13ea9c4fbc4.17b16a0cab8@tc7-visena>
Permalink: ../VisenaEmail.188.af6da13ea9c4fbc4.17b16a0cab8@tc7-visena/
Also on: postgresql.org/message-id/VisenaEmail.188.af6da13ea9c4fbc4.17b16a0cab8@tc7-visena
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: andreas@visena.com, pgsql-sql@lists.postgresql.org
Subject: Re: Sv: Like Command returning wrong result set
In-Reply-To: <VisenaEmail.188.af6da13ea9c4fbc4.17b16a0cab8@tc7-visena>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox