Re: Using Wildcards
- From: "Ryan Langton" <langton@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 12 Apr 2005 14:32:27 -0500
Hmm... SQL server is converting my query to single quotes, but this still
does not work. It is picking up every record, even if (storage) is
contained within the field being tested, so it appears that the WILDCARD (*)
characters are being taken literally. How do I test the condition WHERE
fieldA (DOES NOT CONTAIN TEXT) "storage"? So records containing "MY
storage", "storageBinC", and "sqlstoragetest" in fieldA would all be
filtered out.
In plain Access it is simple, please see my query example below. How do I
do it in .adp (SQL server)?
Thanks.
"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:%23oQbnO3PFHA.3716@xxxxxxxxxxxxxxxxxxxxxxx
> On SQL-Server, you must generally use single quote ' instead of double
> quotes " to delimit your char strings. There is an option to override
> this but obviously, it's probably not set up in your current
> configuration. Same thing for the dates: use ' instead of # .
>
> The N before the ' is for Unicode.
>
> --
> Sylvain Lafontaine, ing.
> MVP - Technologies Virtual-PC
>
>
> "Ryan Langton" <langton@xxxxxxxxxxxxxxxxxx> wrote in message
> news:ue8RgT2PFHA.1172@xxxxxxxxxxxxxxxxxxxxxxx
>>I recently converted a database from an .mdb to .adp and am having
>>problems with my queries that use wildcards. Here is an example query in
>>my old database:
>>
>> SELECT *
>> FROM tblUnitDescription
>> WHERE (Issued_To NOT LIKE "*storage*");
>>
>> In the .adp, this does not work. I get an error that "*storage*" is an
>> invalid column. When I try to edit in Design View, my Criteria field is
>> changed by access to:
>>
>> NOT LIKE N'[*storage*]'
>>
>> This, however, generates the same error.
>> Any suggestions appreciated.
>> Thanks.
>>
>
>
.
- Follow-Ups:
- Re: Using Wildcards
- From: Sylvain Lafontaine
- Re: Using Wildcards
- References:
- Using Wildcards
- From: Ryan Langton
- Re: Using Wildcards
- From: Sylvain Lafontaine
- Using Wildcards
- Prev by Date: Re: Transactions in Access
- Next by Date: Not Responding Message
- Previous by thread: Re: Using Wildcards
- Next by thread: Re: Using Wildcards
- Index(es):
Relevant Pages
|