I have successfully created an external content type to my SharePoint and I have made a list from it. The problem is my table has over 24000 records in it. I need to grab the last 2000 records and not the first 2000 records as it seems to be doing. Is there any way to run a query against the data I am getting to bring in the last 2000 items?

1 Answer 1


Why don't you create a Stored Procedure that brings the desired Last 2000 items for you, and create Read List Operation from Stored Procedure and rest from the table?

Stored Procedure can look like:

SELECT TOP 2000 columns FROM table
ORDER BY id_column

I hope this will work!

  • Ill give it a shot. I am sure that is what I need to do. I am just new at this :) I have never had to deal with anything SQL related with SharePoint until 2010. It is good to learn new things.
    – lazoDev
    Commented Nov 12, 2012 at 13:10
  • Yeah please try that, and yes it always good to learn new things ;) Commented Nov 12, 2012 at 14:58
  • I cannot seem to get SPD to find my Stored Procedure. I have went through the tutorial blogs.msdn.com/b/sharepointdev/archive/2011/02/10/…"> here and I have been unable to get it to show up in my routines. I love how frustrating SharePoint canbe sometimes.
    – lazoDev
    Commented Nov 12, 2012 at 20:12
  • Fixed it! My problem was the way I was accessing the database. I think my default permissions where not allowing me to see the stored procedures I created. NOOB mistakes all around today :)
    – lazoDev
    Commented Nov 12, 2012 at 20:33
  • you are learning, so no problem :) Commented Nov 12, 2012 at 20:37

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.