Hi All,
I have a table in mysql in which there is a column which have following kind of data

I want to Bifurcate the data in that column into 5 separate columns in the same table in this way
$Category=>Income in this thing "Income" in column "category".
$NAV=>10.2181 in this thing "10.2181" in column "NAV"
$Repurchase;Price=>0 in this thing "0" in column "Rprice".
$Sale;Price=>0 in this thing "0" in column "Sprice"
$Date=>26-Feb-2008 in this "26-Feb-2008" in column "date"

how can we do this in mysql query?

All this data is in varchar format ...
so Can be save NAV , Repurchase Price and Sale price data in Float format and Date as MySQL Date Format....Though it is not necessary required.

thanks to all viewer...

Following query will help you. Here I assume that you have whole data string in "mytable" in column "data". Also I assume that same table contains all other 5 column. For column 1 index is -5, for 2 index is -4 and so on.

update table  mytable

It worked like a charm...


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.