Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-19-2015, 06:27 PM
AKent AKent is offline MS Excel - SQL Data Query Connection to MS Project - Resource Displayed in Multiple lines not in one Windows 7 32bit MS Excel - SQL Data Query Connection to MS Project - Resource Displayed in Multiple lines not in one Office 2013
Novice
MS Excel - SQL Data Query Connection to MS Project - Resource Displayed in Multiple lines not in one
 
Join Date: Aug 2015
Posts: 3
AKent is on a distinguished road
Default MS Excel - SQL Data Query Connection to MS Project - Resource Displayed in Multiple lines not in one

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.
Reply With Quote
  #2  
Old 08-20-2015, 12:09 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline MS Excel - SQL Data Query Connection to MS Project - Resource Displayed in Multiple lines not in one Windows 7 64bit MS Excel - SQL Data Query Connection to MS Project - Resource Displayed in Multiple lines not in one Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,766
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Cross post without links http://www.excelforum.com/excel-gene...-one-line.html
__________________
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
Reply With Quote
  #3  
Old 08-26-2015, 01:24 PM
AKent AKent is offline MS Excel - SQL Data Query Connection to MS Project - Resource Displayed in Multiple lines not in one Windows 7 32bit MS Excel - SQL Data Query Connection to MS Project - Resource Displayed in Multiple lines not in one Office 2013
Novice
MS Excel - SQL Data Query Connection to MS Project - Resource Displayed in Multiple lines not in one
 
Join Date: Aug 2015
Posts: 3
AKent is on a distinguished road
Default

Link added. Now answer question or help respond and do not spam.
Reply With Quote
  #4  
Old 08-26-2015, 01:34 PM
gebobs gebobs is offline MS Excel - SQL Data Query Connection to MS Project - Resource Displayed in Multiple lines not in one Windows 7 64bit MS Excel - SQL Data Query Connection to MS Project - Resource Displayed in Multiple lines not in one Office 2010 64bit
Expert
 
Join Date: Mar 2014
Location: Atlanta
Posts: 837
gebobs has a spectacular aura aboutgebobs has a spectacular aura about
Default

That's sure to get a response. LOL
Reply With Quote
Reply

Tags
ms project, resource, sql data query excel

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Excel - SQL Data Query Connection to MS Project - Resource Displayed in Multiple lines not in one Update data connection - path, database name, query definition jaworski_m Excel 1 08-03-2015 02:37 AM
MS Excel - SQL Data Query Connection to MS Project - Resource Displayed in Multiple lines not in one Extracting data from a cell with multiple lines of text 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

Other Forums: Access Forums

All times are GMT -7. The time now is 11:43 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft