Re: SQL is fetching results BLANK checks but the data has no BLANKS

From: M Sarwar <sarwarmd02(at)outlook(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Erik Wienhold <ewie(at)ewie(dot)name>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: SQL is fetching results BLANK checks but the data has no BLANKS
Date: 2023-07-05 22:36:53
Message-ID: DM4PR19MB5978A528C701945114575E63D32FA@DM4PR19MB5978.namprd19.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

David,

SELECT test_number
FROM bronx.test_test_details_all_mcm
WHERE test_description LIKE ' %'
;

"TEST1P1 " "[ 1.8V Continuity (274 pins) ]"

"TEST1P2 " "[ DDR3 Continuity (287 pins) ]"

"TEST1P3 " "[ PCIe Continuity (82 pins) ]"

"TEST2P1 " "[ CLK_REF_A_IN Differential ]"

"TEST2P2 " "[ DDR3_REF_CLOCK Differential ]"

They do have a space at the beginning. My bad.
Thank you,
Sarwar

________________________________
From: David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
Sent: Wednesday, July 5, 2023 6:06 PM
To: M Sarwar <sarwarmd02(at)outlook(dot)com>
Cc: Erik Wienhold <ewie(at)ewie(dot)name>; pgsql-admin(at)lists(dot)postgresql(dot)org <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: SQL is fetching results BLANK checks but the data has no BLANKS

On Wed, Jul 5, 2023 at 2:56 PM M Sarwar <sarwarmd02(at)outlook(dot)com<mailto:sarwarmd02(at)outlook(dot)com>> wrote:
Yes, I am getting the same results for the following SQLs.

SELECT test_number
FROM bronx.test_test_details_all_mcm
WHERE test_description LIKE ' %'
;

*

How about:

SELECT test_number, '[' || test_description || ']'
FROM bronx.test_test_details_all_mcm
WHERE LEFT(TEST_DESCRIPTION, 1) = ' '
LIMIT 5;

?

David J.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message kaido vaikla 2023-07-06 16:27:38 Invoke OOM killer
Previous Message David G. Johnston 2023-07-05 22:06:17 Re: SQL is fetching results BLANK checks but the data has no BLANKS