Re: SQL statement
- From: "Jens Peter Karlsen [FP-MVP]" <jpkarlsen@xxxxxxxx>
- Date: Thu, 11 Aug 2005 08:21:26 +0200
The % goes last. As you wrote it, it will return any records with "i"
somewhere in them not just those that start with "i".
Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
On Wed, 10 Aug 2005 14:32:38 -0500, "clintonG"
<csgallagher@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>SELECT * FROM tblCompany WHERE CompanyName LIKE '%" & strSearch & "'"
>
>Download SQL Server Books Online [1].
>
><%= Clinton Gallagher
> METROmilwaukee (sm) "A Regional Information Service"
> NET csgallagher AT metromilwaukee.com
> URL http://metromilwaukee.com/
> URL http://clintongallagher.metromilwaukee.com/
>
>[1] http://www.microsoft.com/sql/techinfo/productdoc/2000/books.mspx
>
>
>"L" <L@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>news:C7F60C0C-9B80-48B2-BD3C-FA95F2EEC17C@xxxxxxxxxxxxxxxx
>>I would like to incorporate a serach page on my web site. I would like
>> for the user to be able to search on a company name and list all the
>> companys that start with "i" if the user types in "i". I know that I need
>> to add a wildcard character but unsure of the syntax.
>> Here's the code below:
>> strsql= "SELECT * FROM tblCompany where CompanyName LIKE '"&strSearch&"'"
>>
>> Thanks.
>>
>
.
- References:
- SQL statement
- From: L
- Re: SQL statement
- From: clintonG
- SQL statement
- Prev by Date: Re: HOw do i link to a local file in Front page
- Next by Date: Re: Submitted record is not added to Access table
- Previous by thread: Re: SQL statement
- Next by thread: Submitted record is not added to Access table
- Index(es):
Relevant Pages
|