I did SQL server query to retrieve tasks list data but the field AssignedTo not retrieved i don't know why?

My SQL query :

SELECT W.Title [webTitle],
    AD.tp_ID [Task Id],
    tp_columnset.value('(nvarchar1)[1]','nvarchar(200)') as [Task Name],
    tp_columnset.value('(nvarchar5)[1]','nvarchar(50)') as [Task Outcome],
    tp_columnset.value('(nvarchar4)[1]','nvarchar(50)') as [Task Status],
    tp_columnset.value('(ntext1)[1]','nvarchar(200)') as [user comment],
     FROM [WSS_Content].[dbo].[AllUserData] AD 
     INNER JOIN [WSS_Content].[dbo].[AllLists] AL ON AD.[tp_ListId]=AL.tp_ID 
     INNER JOIN [WSS_Content].[dbo].[Webs] W ON W.Id = AL.tp_WebId 
     WHERE AL.tp_Title = 'TasksListName' AND AD.tp_DeleteTransactionId = 0x

The output of the column tp_columnset :

<nvarchar1>task name</nvarchar1>
<nvarchar3>(2) Normal</nvarchar3>
<nvarchar4>Not Started</nvarchar4>

1 Answer 1


i did this task using rest api

html code :


    <table id="tasksTable" >
                                <th>Task title</th>
                                <th>Assigned Date</th>

script code :

      function getTasks(url, success) {
                type: "GET",
                contentType: "application/json; odata=verbose",
                url: url,
                headers: {
                    "accept": "application/json;odata=verbose"
                dataType: "json",
                success: function (response) {
                error: function (err) {
                    console.log(" error!");

$(document).ready(function () {

  var currentUserId;
        getTasks("http://localhost/subsite/_api/Web/CurrentUser?$select=Id", function (data) {
           currentUserId = data.d.Id;
 getTasks("http://localhost/subsite/_api/Web/lists/getbytitle('Workflow Tasks')/items? 
$filter=AssignedTo/ID eq " + currentUserId + " and PercentComplete eq 0 ", function (data) 
              $.each(data.d.results, function (i, v) {
                            if (data.d.results.length) {
                                var r = $('<tr><td>' + v.Title + '</td><td>' + v.Created + 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.