[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-admin
Subject:    Re: SQL is fetching results BLANK checks but the data has no BLANKS
From:       M Sarwar <sarwarmd02 () outlook ! com>
Date:       2023-07-05 22:36:53
Message-ID: DM4PR19MB5978A528C701945114575E63D32FA () DM4PR19MB5978 ! namprd19 ! prod ! outlook ! com
[Download RAW message or body]

[Attachment #2 (text/plain)]

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.g.johnston@gmail.com>
Sent: Wednesday, July 5, 2023 6:06 PM
To: M Sarwar <sarwarmd02@outlook.com>
Cc: Erik Wienhold <ewie@ewie.name>; pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.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@outlook.com<mailto:sarwarmd02@outlook.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.


[Attachment #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} \
</style> </head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: \
rgb(0, 0, 0);" class="elementToProof"> <div class="x_MsoNormal ContentPasted0" \
style="margin: 0px 0in; font-size: 11pt; font-family: Calibri, sans-serif; color: \
rgb(36, 36, 36); background-color: rgb(255, 255, 255);"> <span style="font-family: \
Calibri, Helvetica, sans-serif; margin: 0px; display: inline; color: rgb(66, 66, 66); \
background-color: rgb(255, 255, 255);">David,</span></div> <div class="x_MsoNormal \
ContentPasted0" style="margin: 0px 0in; font-size: 11pt; font-family: Calibri, \
sans-serif; color: rgb(36, 36, 36); background-color: rgb(255, 255, 255);"> <span \
style="font-family: Calibri, Helvetica, sans-serif; margin: 0px; display: inline; \
color: rgb(66, 66, 66); background-color: rgb(255, 255, 255);"><br> </span></div>
<div class="x_MsoNormal ContentPasted0" style="margin: 0px 0in; font-size: 11pt; \
font-family: Calibri, sans-serif; color: rgb(36, 36, 36); background-color: rgb(255, \
255, 255);"> <span style="font-family: Calibri, Helvetica, sans-serif; margin: 0px; \
display: inline; color: rgb(66, 66, 66); background-color: rgb(255, 255, \
255);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT test_number</span><br \
style="font-family: Calibri, Helvetica, sans-serif; color: rgb(66, 66, 66); \
background-color: rgb(255, 255, 255);"> </div>
<div class="x_MsoNormal ContentPasted0" style="margin: 0px 0in; font-size: 11pt; \
font-family: Calibri, sans-serif; color: rgb(36, 36, 36); background-color: rgb(255, \
255, 255);"> <span style="font-family: Calibri, Helvetica, sans-serif; margin: 0px; \
display: inline; color: rgb(66, 66, 66); background-color: rgb(255, 255, \
255);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>&nbsp;</span><span \
class="x_gmail_default" style="font-family:arial, helvetica, \
sans-serif;margin:0px"></span>FROM  bronx.test_test_details_all_mcm</span><br \
style="font-family: Calibri, Helvetica, sans-serif; color: rgb(66, 66, 66); \
background-color: rgb(255, 255, 255);"> <span style="font-family: Calibri, Helvetica, \
sans-serif; margin: 0px; display: inline; color: rgb(66, 66, 66); background-color: \
rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE \
test_description LIKE ' %'</span><br style="font-family: Calibri, Helvetica, \
sans-serif; color: rgb(66, 66, 66); background-color: rgb(255, 255, 255);"> </div>
<div class="x_MsoNormal ContentPasted0" style="margin: 0px 0in; font-size: 11pt; \
font-family: Calibri, sans-serif; color: rgb(36, 36, 36); background-color: rgb(255, \
255, 255);"> <span style="font-family: Calibri, Helvetica, sans-serif; font-size: \
16px; display: inline !important; color: rgb(0, 0, 0); background-color: rgb(255, \
255, 255);">;</span><br> </div>
<div class="x_MsoNormal ContentPasted0" style="margin: 0px 0in; font-size: 11pt; \
font-family: Calibri, sans-serif; color: rgb(36, 36, 36); background-color: rgb(255, \
255, 255);"> <span style="font-family: Calibri, Helvetica, sans-serif; font-size: \
16px; display: inline !important; color: rgb(0, 0, 0); background-color: rgb(255, \
255, 255);"><br> </span></div>
<p class="x_MsoNormal ContentPasted0" style="margin: 0in; font-size: 11pt; \
font-family: Calibri, sans-serif; color: rgb(36, 36, 36); background-color: rgb(255, \
255, 255);"> &quot;TEST1P1&nbsp;&nbsp; \
&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;[ 1.8V Continuity (274 pins) \
]&quot;</p> <p class="x_MsoNormal ContentPasted0" style="margin: 0in; font-size: \
11pt; font-family: Calibri, sans-serif; color: rgb(36, 36, 36); background-color: \
rgb(255, 255, 255);"> &quot;TEST1P2&nbsp;&nbsp; \
&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;[ DDR3 Continuity (287 pins) \
]&quot;</p> <p class="x_MsoNormal ContentPasted0" style="margin: 0in; font-size: \
11pt; font-family: Calibri, sans-serif; color: rgb(36, 36, 36); background-color: \
rgb(255, 255, 255);"> &quot;TEST1P3&nbsp;&nbsp; \
&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;[ PCIe Continuity (82 pins) \
]&quot;</p> <p class="x_MsoNormal ContentPasted0" style="margin: 0in; font-size: \
11pt; font-family: Calibri, sans-serif; color: rgb(36, 36, 36); background-color: \
rgb(255, 255, 255);"> &quot;TEST2P1&nbsp;&nbsp; \
&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;[ CLK_REF_A_IN Differential \
]&quot;</p> <p class="x_MsoNormal ContentPasted0" style="margin: 0in; font-size: \
11pt; font-family: Calibri, sans-serif; color: rgb(36, 36, 36); background-color: \
rgb(255, 255, 255);"> &quot;TEST2P2&nbsp;&nbsp; \
&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;[ DDR3_REF_CLOCK Differential \
]&quot;</p> They do have a space at the beginning. My bad.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: \
rgb(0, 0, 0);" class="elementToProof"> Thank you,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: \
rgb(0, 0, 0);" class="elementToProof"> Sarwar</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: \
rgb(0, 0, 0);" class="elementToProof"> <br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: \
rgb(0, 0, 0);" class="elementToProof"> <br>
</div>
<div id="appendonsend"></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: \
rgb(0, 0, 0);"> <br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size: \
11pt; color: rgb(0, 0, 0);"><b>From:</b> David G. Johnston \
&lt;david.g.johnston@gmail.com&gt;<br> <b>Sent:</b> Wednesday, July 5, 2023 6:06 \
PM<br> <b>To:</b> M Sarwar &lt;sarwarmd02@outlook.com&gt;<br>
<b>Cc:</b> Erik Wienhold &lt;ewie@ewie.name&gt;; pgsql-admin@lists.postgresql.org \
&lt;pgsql-admin@lists.postgresql.org&gt;<br> <b>Subject:</b> Re: SQL is fetching \
results BLANK checks but the data has no BLANKS</font> <div>&nbsp;</div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div class="x_gmail_default" style="font-family:arial,helvetica,sans-serif"><span \
style="font-family:Arial,Helvetica,sans-serif">On Wed, Jul 5, 2023 at 2:56 PM M \
Sarwar &lt;<a href="mailto:sarwarmd02@outlook.com">sarwarmd02@outlook.com</a>&gt; \
wrote:</span><br> </div>
</div>
<div class="x_gmail_quote">
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px \
solid rgb(204,204,204); padding-left:1ex"> <div class="x_msg2776714784631926122">
<div dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: \
rgb(0, 0, 0);"> Yes, I am getting the same results for the following SQLs.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: \
rgb(0, 0, 0);"> <br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: \
rgb(0, 0, 0);"> <span style="font-size: 14.6667px; display: inline; color: rgb(66, \
66, 66); background-color: rgb(255, 255, \
255);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT test_number</span><br \
style="font-size: 14.6667px; color: rgb(66, 66, 66); background-color: rgb(255, 255, \
255);"> <span style="font-size: 14.6667px; display: inline; color: rgb(66, 66, 66); \
background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
<span class="x_gmail_default" \
style="font-family:arial,helvetica,sans-serif"></span>FROM \
bronx.test_test_details_all_mcm</span><br style="font-size: 14.6667px; color: rgb(66, \
66, 66); background-color: rgb(255, 255, 255);"> <span style="font-size: 14.6667px; \
display: inline; color: rgb(66, 66, 66); background-color: rgb(255, 255, \
255);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE test_description LIKE ' \
%'</span><br style="font-size: 14.6667px; color: rgb(66, 66, 66); background-color: \
rgb(255, 255, 255);"> ;</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: \
rgb(0, 0, 0);"> <ul>
<li style=""><br>
</li></ul>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div class="x_gmail_default" style="font-family:arial,helvetica,sans-serif">How \
about:</div> <div class="x_gmail_default" \
style="font-family:arial,helvetica,sans-serif"><br> </div>
<div class="x_gmail_default" style="font-family:arial,helvetica,sans-serif">SELECT \
test_number, '[' || test_description || ']'</div> <div class="x_gmail_default" \
style="font-family:arial,helvetica,sans-serif"><span \
style="font-family:Arial,Helvetica,sans-serif">FROM \
bronx.test_test_details_all_mcm</span></div> <span class="x_gmail_default" \
style="font-family:arial,helvetica,sans-serif"></span>WHERE LEFT(TEST_DESCRIPTION, 1) \
= ' '</div> <div class="x_gmail_quote">
<div class="x_gmail_default" style="font-family:arial,helvetica,sans-serif">LIMIT \
5;</div> <br>
</div>
<div class="x_gmail_quote">
<div class="x_gmail_default" style="font-family:arial,helvetica,sans-serif">?</div>
<div class="x_gmail_default" style="font-family:arial,helvetica,sans-serif"><br>
</div>
</div>
<div class="x_gmail_quote">
<div class="x_gmail_default" style="font-family:arial,helvetica,sans-serif">David \
J.</div> <br>
</div>
</div>
</div>
</body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic