Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ervF8-0007DF-5h for pgsql-general@arkaria.postgresql.org; Sat, 03 Mar 2018 00:41:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ervF7-0002BK-1Y for pgsql-general@arkaria.postgresql.org; Sat, 03 Mar 2018 00:41:41 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ervF6-0002B9-FI for pgsql-general@lists.postgresql.org; Sat, 03 Mar 2018 00:41:40 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ervF3-0008Mu-H1 for pgsql-general@postgresql.org; Sat, 03 Mar 2018 00:41:39 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 8CC4820EC0; Fri, 2 Mar 2018 19:41:36 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Fri, 02 Mar 2018 19:41:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=tF5W8mGS41JXZUQhVhdQi8Fx214ve J4XrBlMXKGPDNU=; b=B21l9QVbFA77+BTTWzdbxqqQOme9haAd8wE/6joVLpKYa yamXaBCGVvAabFnPY5WYet/8PA/Cx6zkswKpg1juicWFee8UGSFW5Zft1tlbWZho BpF6Ud1qQ4s2zDl0EoB8wEBp6AiOglh5ng9je7p5Qq/jJoPe1OF4Ioy+sQSkzs40 S4zn6kzzigpmR0M/adzGH/ohwnGGiqTTRgRfpYiBl8wB80QPaED7wqWq0gK+59SG fA8M9OtD+EOHkx+iUTwAMtgoew0SK2ozvfxffaOuAQ/KeAoKjA3iQFpmT1haALXn VwjyEaKREecyZ2DLRwkMYFNV4y/YbyksEN5v2OAtQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=tF5W8m GS41JXZUQhVhdQi8Fx214veJ4XrBlMXKGPDNU=; b=i++Z6JtG1CNqVu9VEZyD1j g7Zg3je/uUkkNQ9j+d3Cj+pz+OkFtFF/ChzQ1gJFhCHrcnaGaguJvJ1TjKwX/UDQ KcD2jS/Brk3IUElrIHZ78dh1EWUmzX8NIXv94ISuWz46K3z+UbZ9Eet8BR2eXNE7 yczQPtuyVBLEuoxox1oyxFThZEA6RioOtwrFztlywRT0WwFTuZbgUL9x5kAicZPG yaOehvEe+A6xXiRwN16IjzyWkWPLZ24hCMonvhAPXLjXH9zsOit6mTiD6RiUMczu VasD5j8RXVwiqZy9OPvueP9bqhktaAU2wkj809zH8A0ck7Yn/rs3CFsNxzrZgpXg == X-ME-Sender: Received: from [192.168.1.2] (71-35-123-124.tukw.qwest.net [71.35.123.124]) by mail.messagingengine.com (Postfix) with ESMTPA id 1EE747E623; Fri, 2 Mar 2018 19:41:36 -0500 (EST) Subject: Re: SQL syntax To: Dale Seaburg , pgsql-general@postgresql.org References: From: Adrian Klaver Message-ID: <8be3c025-ebf8-59f4-1ab8-22206947e078@aklaver.com> Date: Fri, 2 Mar 2018 16:41:35 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 03/02/2018 04:36 PM, Dale Seaburg wrote: > My mind is drawing a blank.  Not sure where to go to find the answer. > Here is the statement in C#: > > sSQL = "SELECT \"Image_Filename\" FROM \"Instruments\" WHERE "; > > To finish off the WHERE clause, I need to look at the first 2 letters, > like "D:".  My question is how do I specify in the WHERE clause, to look > at the first 2 characters in the Image_Filename column?  What is the > correct SQL syntax for looking at just a portion of a column? SELECT "Image_Filename" FROM "Instruments" WHERE "ImageFilename" LIKE 'D:%'; If you want case insensitive then ILIKE. For more info: https://www.postgresql.org/docs/10/static/functions-matching.html#FUNCTIONS-LIKE > > I feel so dumb...  This can't be that hard, but I am exhausted and > running out of ideas.  I need someone to give me a boost!  ;-) > > Thanks, > Dale. > > -- Adrian Klaver adrian.klaver@aklaver.com