[plug] Re: [OT] SQL column splitting

Alex Polglaze apolglaze at book-keepingnetwork.com.au
Tue Nov 16 08:47:42 WST 2004


G'day


>>I want like to split
>>('1', 'A', 'x,y, z'), ('2', 'B', 'i')
>>into
>>('1', 'A', 'x'), ('1', 'A', 'y'), ('1', 'A', ' z'), ('2', 'B', 'i')
> 
> 
> Just to be clear about the sort of solutions I am after... The table
> contains entries like 'x,y, z' because of the nature of its application.
> Since ',' is a delimiter in this case, my problem is one of "converting"
> the data to a more relational model. However, because circumstances
> prevent this from being solved with a one-off migration, I would like
> to be able to do it dynamically in SQL.

I have delayed replying to this, but it would appear that this is not a great 
problem for us using D3 as a relational database. I believe that we could solve 
this problem in a single pass.

Is the data in a .csv file to start with? How are the sub values 'x,y,z' 
separated from '1' and 'A'?

Alex

Alex




More information about the plug mailing list