Click here to Skip to main content
12,627,681 members (32,675 online)

your query working., but i want the final ouptut.for that how to wirte the query.help me please

Member 8054539 asked:

Open original thread
In MS Access database as follows:
Date          Session   Course     Faculty_Code
 
25/01/2013      1       AFF             GS
25/01/2013      1       AFF             VB
I would like the output as follows:
Date          Session   Course     Faculty_Code
 
25/01/2013      1       AFF             GS,VB
When I tried your query output shows as follows:

I tried with this query:
TRANSFORM First(Tb_SCh_TIme_Table.Faculty_Code) AS a
SELECT Tb_SCh_TIme_Table.Sch_Date, Tb_SCh_TIme_Table.Course
FROM Tb_SCh_TIme_Table
GROUP BY Tb_SCh_TIme_Table.Sch_Date, Tb_SCh_TIme_Table.Course
PIVOT Tb_SCh_TIme_Table.Session;
When I tried your query output shows as follows;
Date          Session   Course     Faculty_Code
 
25/01/2013      1       AFF             GS
In the above output not showing the Two faculty name only shows the GS Faculty_Code. I would like the VB Faculty_Code also.

I need the final output as follows:
Date          Session   Course     Faculty_Code
 
25/01/2013      1       AFF             GS,VB.

For the same date, session and course, different faculty takes class I need to mention both Faculty_Code also.

How can I write the query to get the final output as I mentioned above.

Please help me. How can I do it?


Thanks.
Tags: C#

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the The Code Project Open License (CPOL).



Advertise | Privacy | Mobile
Web02 | 2.8.161205.3 | Last Updated 26 Mar 2009
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100