Note that there are some explanatory texts on larger screens.

plurals
  1. POFull text search stored procedure error
    text
    copied!<p>This is the error I am getting: </p> <pre><code>Syntax error near 'online' in the full-text search condition '""online"*" and "and*" and ""text"*"'. </code></pre> <p>This is my stored procedure:</p> <pre><code>ALTER PROCEDURE dbo.StoredProcedure1 ( @text varchar(1000)=null ) AS SET NOCOUNT ON declare @whereclause varchar(1000) SET @whereclause = @text SELECT articles.ArticleID AS linkid, articles.abstract as descriptiontext, articles.title as title, 'article' as source, articles.releasedate as lasteditdate FROM articles WHERE CONTAINS(title, @whereclause) ORDER BY lasteditdate DESC, source ASC </code></pre> <p>This what i pass to SP: </p> <pre><code>string content = "\"online\" and \"text\""; </code></pre> <p>part of C# code:</p> <pre><code> using (SqlConnection cn = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("StoredProcedure1", cn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@text", SqlDbType.VarChar).Value = searchExpression; cn.Open(); </code></pre> <p><strong>UPDATE:</strong><br> Strings that i try and errors that i get:</p> <pre><code>content = "online text"; Syntax error near 'text' in the full-text search condition 'online text'. content = "\"online\" and \"text\""; Syntax error near 'online' in the full-text search condition '""online"*" and "and*" and ""text"*"'. content = "\"online and text\""; Syntax error near 'online*' in the full-text search condition '""online*" and "and*" and "text"*"'. </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload