How to Query Sharepoint List Data?

Santhosh picture Santhosh · Sep 25, 2013 · Viewed 39.7k times · Source

Does anyone know how to fetch Sharepoint List data using sql query based on the particular sharepoint user.

Answer

Velin Georgiev picture Velin Georgiev · Sep 27, 2013

You cannot use should not really be using SQL to get data from SharePoint list. Most common way of doing this is custom solution where you can use CAML (SPQuery) to retrieve data for list items (created by the user for example) http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spquery.aspx or else you can expose the SharePoint services to get the same results http://msdn.microsoft.com/en-us/library/sharepoint/jj164060.aspx.