Advertisement

07.20.2007 at 08:54AM PDT, ID: 22710024 | Points: 500
[x]
Attachment Details

Sharpoint, add a custom table based on SQL query?

Asked by bwbpro in SQL Server 2005, MS SQL Server, MOSS-Sharepoint

Tags: sharepoint, sql, query, table

My company uses software that integrates Sharepoint as a main dashboard.  It has standard reporting that is built in but I need to do more advanced custom reporting.  I'm finding out this is a different animal from the sql reports I accustomed to writing.  To do customized web parts in Sharepoint, you apparently have to create cubes, dimensions, etc in SQL Analysis Services just as a starting point.  I'm lost enough with that but I'm not even sure where I go from there.  We are running SQL 2005 and Sharepont 3.0.  
Here is an idea of what I need to do.  The following query is one I would like to add to the Sharepoint site as a table web part.  Does anyone know if this is possible?  Here is the query...

SELECT *, DATEDIFF(DAY, LatestShipDate, GETDATE()) AS [DaysSinceShipment]
FROM (
SELECT  i.ORDER_NO as OrderNumber,
CONVERT(CHAR(10),i.ORDER_DATE,101) as OrderDate,
a.ACCT_NAME as Customer,
i.DOC_ALIAS as DocumentType,
i.CUSTCHAR3 as Project,
i.SALES_REP as Rep_1,
i.CUSTCHAR2 as Rep_2,
(select max(order_date)
  from invoices i2
where i2.ref_no=i.doc_no and i2.status=9) as LatestShipDate
FROM  ADDRESS a, INVOICES i
WHERE  a.ADDR_CODE = i.bill_code
AND i.STATUS=8
AND i.PARTIALLY='T'
AND i.SHIPPED='F'
AND i.DOC_ALIAS not like 'ORDER%'
AND ( select max(order_date)
from invoices i2
where i2.ref_no=i.doc_no and i2.status=9) < GETDATE()-30
) AS derived
ORDER BY [DaysSinceShipment]

If anyone can provide advice or resources to help a newbie learn enough to get started on this,  I would really appreciate it!

Thanks!  Brett
Start Free Trial
[+][-]07.20.2007 at 09:14AM PDT, ID: 19532536

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.22.2007 at 05:41AM PDT, ID: 19542426

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.22.2007 at 06:37AM PDT, ID: 19542575

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.24.2007 at 07:14AM PDT, ID: 19556279

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.24.2007 at 07:11PM PDT, ID: 19561824

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32