1
Answer

how to write the sub query to convert rows in to columns and

Photo of narasiman rao

narasiman rao

12y
1.4k
1
Select * from Table Name;
 
Sno          Sch_Date   Session  Course    Faculty_Code
1             1/12/2013   1             AFF       GS
2           1/12/2013     1              AFF        NR
3            1/13/2013    1             TFc        VB
 
i want the output in ms access database;
 
for that below how to write sub query and get the below output.
 
in faculty_code column that GS,NR to be want in the 1/12/2013 date.
 
for that how to write sub query, convert rows in to columns and put it in to a single column(GS,NR) fro the 1/12/2013 my required output.
 

Sno            Sch_Date        Session            Course            Faculty_Code
1             1/12/2013           1                    AFF                         GS,NR

how can i do.help me.

please reply the answer. i posted question in your site. but some times not updating the answer.

kindly please repay answer for my above question and help me please.


Answers (1)

0
Photo of mohan517
NA 7 0 20y
Hi, Thanks for reply. Actually I am trying to develop an application with central database ( Ms SQL). And users connect to this database. Whenever user connects to the central database for first time I application needs to copy all the tables needed by this particular user on his local machine database. So that he can access his local copy when he is offline. And some periodical synchronization to be carried out to keep all copies consistent. I need ur help to know what to use for this kind of application may be ADO.net or SQLDMO or SQL Server CE 2.0. What will be the good one to start with. Thanks, mohan
0
Photo of miker
NA 340 0 20y
... 3. Create DTS package and execute it using dtsrun command line utility. Mike
0
Photo of Andrzej Wegierski
NA 705 0 20y
1. Use Microsoft tool named DTS (Start->Programs->Microsoft SQL Server->Import and Export Data), not c# 2. If You must use C# (see help): - use ExecuteNonQuery() method to create new table in database2 - read data from database1 into datatable1 of dataset (rows status will be unchanged) - create datatable2 and import rows from datatable1 into it to get row status=inserted (may be someone know about better trick ???) - update table created in database2 with data from datatable2