crazy_guy
2009-12-10 22:58:17 UTC
the value stored in drugs column is multiple drugs seprated by comma eg 'drug1,drug2, drug3'
and there can be no of rows with values
Eg.
ID Name Drugs
01 name1 Drug1,Drug2,Drug3
02 name2 Drug4,Drug5,Drug6
how can convert the comma separated value in column drugs to column in sql
so that i can get the values in collumn
i.e
ID Name Drugs
------------------------------------
01 name1 Drug1
01 name1 Drug2
01 name1 Drug3
02 name2 Drug4
02 name2 Drug5
02 name2 Drug6
please help me with a detailed sql code