Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i3NSN-00045G-2i for pgsql-general@arkaria.postgresql.org; Thu, 29 Aug 2019 16:39:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i3NSM-0000hz-0B for pgsql-general@arkaria.postgresql.org; Thu, 29 Aug 2019 16:39:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i3NSL-0000df-Kq for pgsql-general@lists.postgresql.org; Thu, 29 Aug 2019 16:39:29 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i3NSJ-0001Od-AU for pgsql-general@lists.postgresql.org; Thu, 29 Aug 2019 16:39:28 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 5803A9939A for ; Thu, 29 Aug 2019 09:39:24 -0700 (PDT) Date: Thu, 29 Aug 2019 09:39:24 -0700 (PDT) From: Rich Shepard Reply-To: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: Query using 'LIKE' returns empty set Message-ID: User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Next problem is one I've not before encountered. The .sql file used to import data to the fish_counts table has rows such as this one: ('1237796458250','0','17174','Buchanan Creek','Buchanan Creek trib to North Fork Nehalem River','0-3.25','161980','Unknown','Jack or subadult','Peak live & dead fish','Spawner Counts','ODFW','2012-01-06','1950-1974',25, '1950-10-01','1951-01-31','Ground','Actual Physical Counts',0), [Lines wrapped in the message only.] When I submit this query I get no rows returned: select * from fish_counts where stream_tribs ilike 'Nehalem'; count_id | loc_id | downstream | upstream | stream_name | stream_tribs | r iver_miles | itis_tsn | production | life_stage | count_type | data_categor y | compiled_by | updated | years | nbr_observations | begin_date | end_dat e | sample_method | calc_method | count_value ----------+--------+------------+----------+-------------+--------------+-- -----------+----------+------------+------------+------------+------------- --+-------------+---------+-------+------------------+------------+-------- --+---------------+-------------+------------- (0 rows) What is equally puzzling is when I search the input file using grep -c -e "Nehalem" fish_counts 0 is returned, the same as the postgres query. I want to understand what I've done incorrectly. TIA, Rich