Quantcast
Channel: SharePoint 2010 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 17574

WHERE Clause in SharePoint Search SQL Syntax

$
0
0

Hi All,

I want to fetch data for the autosuggestion in the sharepoint search...for that a specified a sql query in the <QueryText> of the queryXML.

the query is somehow like

SELECT Title, Path, Description, Write, Rank, Size FROM scope() WHERE CONTAINS(*,'\"" + query + "*\"') AND \"scope\" = '" + quickSearchConfig.scope + "'  \
              ORDER BY \"Rank\"

after the query is executed the search result i am getting is from the all the contents i.e Title, Path, Description, Write, Rank, Size wherever it is getting the given search text.

My question is if i want to confine the search for the Title only what modification can be done in the where clause.

Because I found that for the select statement the given attributes are mandatory to give.

What can be the solution....?

Please suggest....

Thanks

Suu30


Sucharita Dansana


Viewing all articles
Browse latest Browse all 17574

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>