Re: Syntax error (missing operator) in query expression
From: Chris Hohmann (nospam_at_thankyou.com)
Date: 08/07/04
- Next message: Chris Hohmann: "Re: PROBLEM SOLVED :)))"
- Previous message: joker: "Re: Cookies - Is this possible?"
- In reply to: shank: "Syntax error (missing operator) in query expression"
- Next in thread: Aaron [SQL Server MVP]: "Re: Syntax error (missing operator) in query expression"
- Reply: Aaron [SQL Server MVP]: "Re: Syntax error (missing operator) in query expression"
- Reply: shank: "Re: Syntax error (missing operator) in query expression"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 7 Aug 2004 15:32:38 -0700
"shank" <shank@tampabay.rr.com> wrote in message
news:egW5MiCfEHA.4092@TK2MSFTNGP10.phx.gbl...
> 1) I'm getting this error: Syntax error (missing operator) in query
> expression on the below statement. Can I get some advice.
>
> 2) I searched ASPFAQ and came up blank. Where can find the "rules" for
when
> and how to use single quotes and double quotes in ASP?
>
> thanks!
> ----------------------
> SQL = SQL & "WHERE '" &
>
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE("GenKTitles.
> Title","'",""),",",""),".","")," ",""),"the",""),"and",""),"&",""),"/","")
&
> "' LIKE '%' '" & T & "' '%' "
>
This appears to be related to your other "syntax error" post. If so, it may
have been better to post a follow-up to that thread. Given that context, it
appears that you're attempting to eliminate false positives from your
searches by discluding common words and punctuations. If this is the case,
perhaps it would be easier to remove those items from the search term
instead of attempting to remove them from the GenKTitles.Title column in
your database. If you took this approach you could make use of a regular
expression to "scrub" the search term prior to constructing the SQL
statement. Also, please consider using a stored procedure (or parameterized
query depending on your database environment) instead of dynamically
constructing the SQL statement. Also, in the future, please provide
database, version, DDL, sample data and desired output/results. Here's are
some guidelines
- Next message: Chris Hohmann: "Re: PROBLEM SOLVED :)))"
- Previous message: joker: "Re: Cookies - Is this possible?"
- In reply to: shank: "Syntax error (missing operator) in query expression"
- Next in thread: Aaron [SQL Server MVP]: "Re: Syntax error (missing operator) in query expression"
- Reply: Aaron [SQL Server MVP]: "Re: Syntax error (missing operator) in query expression"
- Reply: shank: "Re: Syntax error (missing operator) in query expression"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|