SQL syntax

From: Dale Seaburg <kg5lt(at)verizon(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: SQL syntax
Date: 2018-03-03 00:36:57
Message-ID: ff87d197-7438-5eb5-065d-f7c52c69b741@verizon.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?

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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-03-03 00:41:35 Re: SQL syntax
Previous Message Gary M 2018-03-02 23:13:51 Re: Is there a continuous backup for pg ?