![]() |
|
![]() |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
I have the following code in External Data Connections for Excel: It retrieves the resources from MS Project and repeats the same task in the table for however many resources there are, which is what I don't want. How can I display all resources for the same task in one line from the SQL Query:
For example: Current Display: Task Resource Prep Work Room A Prep Work Room B Prep Work Room C Execution Room D Execution Room E What I want is: Task Resource Prep Work Room A, Room B, Room C Execution Room D, Room E Code Is Outlined Below: SELECT DISTINCT P_ProjectDetails.Client AS 'Client', P_ProjectDetails.Product AS 'Product', T.[Project Reference] AS 'Project Number', A.ResourceName AS 'Resource', T.TaskName AS 'Task', T.TaskStartDate AS 'Start', T.TaskFinishDate AS 'Finish', T.[Lot Number], FROM dbo.MSP_EpmProject_UserView P, dbo.MSP_EpmTask_UserView T LEFT OUTER JOIN dbo.MSP_EpmProject_UserView P_ProjectDetails ON T.[Project Reference]=P_ProjectDetails.[Project Number] LEFT OUTER JOIN dbo.MSP_EpmAssignment_UserView A ON A.TaskUID=T.TaskUID WHERE P.ProjectUID=T.ProjectUID AND P.ProjectName = 'Operation Schedule of All Projects' --AND T.[Project Reference] IS NOT NULL --AND A.ResourceName NOT IN ('Unassigned Resource','Local Generic Resource') ORDER BY 1, 2 http://www.excelforum.com/excel-gene...-one-line.html Last edited by AKent; 08-20-2015 at 05:36 AM. |
#2
|
||||
|
||||
![]()
Cross post without links http://www.excelforum.com/excel-gene...-one-line.html
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#3
|
|||
|
|||
![]()
Link added. Now answer question or help respond and do not spam.
|
#4
|
|||
|
|||
![]()
That's sure to get a response. LOL
|
![]() |
Tags |
ms project, resource, sql data query excel |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
jaworski_m | Excel | 1 | 08-03-2015 02:37 AM |
![]() |
MMT | Excel | 9 | 02-12-2015 09:18 PM |
userform to enter multiple lines of data in template | callasabra | Word VBA | 0 | 06-27-2014 05:29 PM |
Excel 2007 security alert - data connection message every time? | michael.monaco | Excel | 0 | 12-20-2012 07:47 AM |
How to Query Text in MS-Excel 2010 or Import Data & Query outside of Excel? | mag | Excel | 0 | 10-18-2012 11:15 AM |