SharePoint List data with SQL Server Reporting Services

SharePoint is becoming more populler every day, companies from around the world are starting using it as main intranet site of their headoffice.

update 16/5/2009
4- the fourth way is to map the list directly to a database (Well i didn’t wrote that because two things first it is redundancy, second it is hard to keep updating both the database and sharepoint lists when-ever any change happens to any record, but Mr. Allan seems to have a great solution for that in the comments which is “SLAM ” (http://slam.codeplex.com)
SLAM allows you to easily maintain SharePoint data by hooking up against lists (or content types!) and having the data automatically synchronized with SQL server in real time. Best of all, it converts SharePoint look-ups to associations (with any multiplicity, one to one, one to many, many to many) that you can easily built queries against.
Thanks a for letting us know about this tool
update 21/5/2009 :
Well this time i tried the 2nd way on production (it works very well while it is on my machine in visual studio) but if we need to add it to the reporting services server it didn’t work on my enviroment not sure if it works on other enviroments
تلميحات SQL 1 البحث السريع بدون استخدام like
فكرت اضع بعض تلميحات ال اس كيو ال SQL كون لا بد لأي مبرمج في هذه الفترة ان يستخدمها لكي يتصل بقاعدة بياناته
هنالك الكثير من الحركات الجميلة في هذه اللغة التي نغفل عنها لقلة وقت الإطلاع و هذه أحد تلك الحركات
البحث السريع دون استخدام like
في حالة اذا كان لدينا في احد جداول قاعدة البيانات عمود يحتوي على نص طويل مثلا نص قصة أو مثلا تدوينة أو رسالة او موضوع منتدى طبعا هذا النص سيتكون من العديد من الكلمات – الآلاف منها — .
في حين الحاجة للبحث سنبحث عن كلمة معينة في جميع نصوص مواضيع المنتديات مثلا . فأسهل طريقة لعمل ذلك هي
ولكن ماذا لو كان لدينا الكثير من المواضيع (بالتالي رفوف كثيرة بالملاين في جدول الـ articles ) حينها سيصبح البحث بطيئا جدا
فاذا كان الهدف من البحث لديك هو الوصول للنتيجة بأسرع طريقة فهذه إحدى الطرق التي اجدها جيدة في الـ MYSQL
أولا عليك جعل جدول الـ articles من نوع الـ MyIsam
ثانيا : علينا اضافة خاصية ارضفة للعمود body و ذلك بالأمر التالي
الآن حين البحث اذا استعملنا الاستعلام التالي الذي يبحث عن كلمة database في عمود الـ body من جدول الـ
“select title , MATCH (body) AGAINST (‘database’) as rank from articles ORDER BY rank desc;”
سنحصل على نتيجة مثل :
—————–
|sqltip | 1.3 |
| eclipse| 0 |
|.NET | 0 |
“select title , MATCH (body) AGAINST (‘database’) as rank from articles where MATCH (body) AGAINST (‘database’) > 0 ORDER BY rank desc;”
اتمنى ان تكون هذه التلميحة مفيدة لكم
لرؤية التدوينة في نسختها الانجليزية تفضل هنا
SQLTip1: search database faster without like
SQL tip 2, SQL tip 3
well all of us need to deal with databases and sql query and most of the time we need to provide searching abilities to users.
well the easiest way is using like i.e to search articles containing the word “database” this query is goo enough “Select title from articles where body like ‘%database%’”.
but what if we have the articles table so huge and contains lots of rows and each row has a huge article !!!!, well simply the database work will be slowed down and will effect the work of other functions of the applications.
if this is the situation indexing the body column of the table and searching the index would be much faster (( well yeah i know this is a basic knowledge for database experts but most of the developers dont use it that why i am mentioning it))
so lets see how this is done in MYSQL:
to create the index you have to do this
ALTER TABLE articles ADD FULLTEXT(body);
then while searching the query will be something like
“select title , MATCH (body) AGAINST (‘database’) as rank from articles ORDER BY rank desc;”
this will return some thing like
|title | rank |
—————–
|sqltip | 1.3 |
| eclipse| 0 |
|.NET | 0 |
____________
where rank is 0 where it didnt found the searching keyword
and it is bigger where-ever it finds the searching keyword more (more relivent)
so to get only the good results the query will be
“select title from articles where MATCH (body) AGAINST (‘database’) > 0 ;”
Read More
