Click here to Skip to main content
15,899,026 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
the format i am getting is as below
name||  roll ||  subject|| attended || number of class||percentage
rash||	110	| ip	| 0	| 1	| 0
b	|| bca2	| ds	| 1	| 3	| 33.33
b	|| bca2	| dm	| 2	| 3	| 66.67
bbb	|| bca3	| ec	| 1	| 2	| 50
bbb	|| bca3	| c	| 2	|3	| 66.67
bbb	|| bca3	| ip	| 1	| 2	| 50
bbb	|| bca3	| ds	| 0	| 3	| 0
d	|| bca4 | dm	| 3	| 7	| 42.86
d	|| bca4	| ec	| 1	| 3	| 33.33
d	|| bca4	| c	| 2	| 4	| 50
d	|| bca4	|ip	| 0	| 2	| 0

but i need 1st and 2nd column to be merged so that i get name and roll number as one single cell..
can anyone help me??
Posted
Updated 24-Feb-14 10:31am
v3
Comments
Vedat Ozan Oner 24-Feb-14 6:57am    
at what point did you get stuck?
BulletVictim 24-Feb-14 8:57am    
Concat the columns in the select from the database

SELECT name +' ' +roll AS COL1, etc...
FROM TABLE
WHERE condition
Sergey Alexandrovich Kryukov 24-Feb-14 16:44pm    
You "concat" not the columns, but strings? How could it possibly be a problem?
—SA
Sergey Alexandrovich Kryukov 24-Feb-14 16:43pm    
Why? And do you need to switch between "merged" or "unmerged" states during runtime? In all cases, what's the problem?
—SA

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



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