Click here to Skip to main content
15,891,761 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
this is my intput

SQL
SELECT Tb_Sch_TIme_Table.Sch_Date, Tb_Sch_TIme_Table.Session, Tb_Sch_TIme_Table.Course, Conc("Faculty_Code","Session"[Session],"Tb_Sch_TIme_Table","Sch_Date",[Sch_Date]) AS Faculty_Code
FROM Tb_Sch_TIme_Table
GROUP BY Tb_Sch_TIme_Table.Course, Tb_Sch_TIme_Table.Sch_Date, Tb_Sch_TIme_Table.Session;


when i run the above query;

output as follows in MS Access;

Sch_Date    Session Course  Faculty_Code<br />
1/12/2013   1   AFF  GS,NR<br />
1/13/2013   1   TFC   VB


SQL
select * from Tb_SCh_TIme_Table;
as follows;

the above output should match which select * from Tb_SCh_TIme_Table;

Sno Sch_Date    Session Course  Faculty_Code<br />
1   1/12/2013   1   AFF GS<br />
2   1/12/2013   1   AFF NR<br />
3   1/13/2013   1   TFC VB


how can i get the ouput.help me

the above one is my input and output.
Posted
Updated 28-Jan-13 1:26am
v2
Comments
Tharaka MTR 28-Jan-13 8:15am    
Your question is not clear. Please explain further
Rob Branaghan 28-Jan-13 9:30am    
I think its because your grouping by on your Select statement, and you're not bringing back the sno field in your select statement.
I dont quite understand what you are trying to do with this data. Why are you grouping?
Akbar Ali Hussain 28-Jan-13 18:01pm    
Is this similar to your another question which I already answered?

http://www.codeproject.com/Questions/534089/InplusMSaccessplustehplusbelowplusisplusnotpluswro
[no name] 30-Jan-13 6:27am    
I found a syntax error on your code "a coma is missing after Session" in tour code

SELECT Tb_Sch_TIme_Table.Sch_Date, Tb_Sch_TIme_Table.Session, Tb_Sch_TIme_Table.Course, Conc("Faculty_Code","Session",[Session],"Tb_Sch_TIme_Table","Sch_Date",[Sch_Date]) AS Faculty_Code
FROM Tb_Sch_TIme_Table
GROUP BY Tb_Sch_TIme_Table.Course, Tb_Sch_TIme_Table.Sch_Date, Tb_Sch_TIme_Table.Session;

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900