Recent Posts

Tuesday, March 26, 2013

How to extract Sharepoint list using SQL Query

I was searching for Sql query to be able to extract the list from Sharepoint database and found a good link that helped me fix the issue

Querying Sharepoint List Item Versions using SQL

Which actually gives the info on list and full sql query to get the list is here:
Hope this helps... enjoy


Declare @ListID as uniqueidentifier

SET @ListID =(SELECT tp_id FROM dbo.AllLists WHERE tp_title ='New User Request')
   --select @ListID
   
   
SELECT      dbo.UserData.tp_ID,
  dbo.UserData.tp_ListId,
  dbo.UserData.tp_Author,
  dbo.UserData.nvarchar1,
                dbo.UserData.nvarchar2,
  dbo.UserData.nvarchar3,
  dbo.UserData.nvarchar4,
  dbo.UserData.nvarchar5,
                dbo.UserData.nvarchar6,
  dbo.UserData.nvarchar7,
  dbo.UserData.nvarchar8,
  dbo.UserData.nvarchar9 ,
                dbo.UserData.nvarchar10,
  dbo.UserData.nvarchar11,
  dbo.UserData.nvarchar12,
  dbo.UserData.*                  --dont forget to modify this to snatch only the columns you need
FROM            dbo.Lists
INNER JOIN
                dbo.UserData ON dbo.Lists.tp_ID = dbo.UserData.tp_ListId
               
               
WHERE  
(dbo.UserData.tp_ListId =@ListID)

Related Posts by Categories




1 comment:

Anonymous said...

I ADAMS KEVIN, a representative Aiico Insurance plc, we trust and respect for individual differences in day out a loan. We will provide 2% of the loan's interest rate. If you are interested in this business contact us by e-mail: (adams.credi@gmail.com) now transfer their loan documents issued properly. Do you need a loan to set up business or school if you are very welcome to Aiico Insurance plc. You can also contact us by e-mail: (adams.credi@gmail.com). We first week can request a balance transfer.

DO YOU NEED LOAN FOR PERSONAL BUSINESS? IF YOU CONTACT YOUR EMAIL ABOVE TO PROCEED WITH YOUR LOAN TRANSFER IMMEDIATELY OK.

Post a Comment