Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have following data:
id details production
1 33,45 1000,56
2 56,78 666,89

i want to make report in following format
1 33 1000
1 45 56
2 56 666
2 78 89

please help me. i am using vb.net with mysql
Posted
Updated 22-Aug-14 22:43pm
v3

1 solution

Don't do it: reorganise your database to include an extra table so that you don't use comma separated data in your table: it's nice and easy to add the data, but everything else is a PITA.

You can do what you want; it's a pain but you can Converting comma separated data in a column to rows for selection[^]

But that is something you have to do every time you need to deal with the data. And have you considered how you will remove one of the comma separated values? Or find the right one?

Change your DB now, while it's still easy to do: you are building up a whole pile of problems for yourself in future, and the later you leave it, the more hassle it is to change!
 
Share this answer
 

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