query and display those data?

avt2k7

New member
Joined
Dec 21, 2011
Messages
4
Programming Experience
3-5
Hello all,

I have a column data named SERIES from tblInfo that contain some similar characters that group by the first two characters as following:
AA 1, AA 2, AA 3, BB 2, BB 15, BB 24, AB 3, AB 4, ...

I would like to display those data to the front end of ASP.NET page dynamically as following:

1. AA series: 1,2,3
2. BB series: 2, 15, 24
3. AB series: 3, 4

Any helping in query and VB.NET codes are much appreciated. Thanks in advance
 
I have to ask, if you want to treat that as two separate bits of data then why are you storing it in a single column? Would it not be better to use two different columns?
 
Hi,

I were not stored that formatted data in the database, so I cannot say why, but I believe they must follow their symbol purpose. My question is how we can chop the data using substring, trim, string builder etc... to display them in horizontal order by group as I listed. I hope that can answer what you asked. Thanks.


I have to ask, if you want to treat that as two separate bits of data then why are you storing it in a single column? Would it not be better to use two different columns?
 
What youre after is a PIVOT query.. Google for how to do it in your chosen database

Either that, or compile the data yourself using a Dictionary(Of String, String) after you download it raw as is
 
Back
Top