dbTalk Databases Forums  

splitting a string into columns

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss splitting a string into columns in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
kes
 
Posts: n/a

Default Re: splitting a string into columns - 05-02-2008 , 10:18 AM







Quote:
Alex

Why does this require a stored procedure and where's the pivot?
--
Thank you for following up.

The csv1 and csv2 columns are a format for RNA sequences that have
been modified. This is why these CSV values are stored in the
database, it's usually been sufficient for our needs over the past 2
years. Now people want to see the different individual values.

e.g., xA,yG,U,G,xG

would be stored as value csv1, now people would like to see, is there
a correlation between U in the third location and this RNA sequence's
efficacy.

the reason for the pivot is I could use level in a select statement to
select
1, xA
2, yG
3, U
4, G
5, xG

then pivot it to
id, csv1_1, csv1_2, csv1_3, csv1_4, csv1_5
3, xA, yG, U, G, xG

using dynamic SQL and decode.

I was just hoping for a more elegant solution.



Reply With Quote
  #12  
Old   
kes
 
Posts: n/a

Default Re: splitting a string into columns - 05-02-2008 , 10:18 AM







Quote:
Alex

Why does this require a stored procedure and where's the pivot?
--
Thank you for following up.

The csv1 and csv2 columns are a format for RNA sequences that have
been modified. This is why these CSV values are stored in the
database, it's usually been sufficient for our needs over the past 2
years. Now people want to see the different individual values.

e.g., xA,yG,U,G,xG

would be stored as value csv1, now people would like to see, is there
a correlation between U in the third location and this RNA sequence's
efficacy.

the reason for the pivot is I could use level in a select statement to
select
1, xA
2, yG
3, U
4, G
5, xG

then pivot it to
id, csv1_1, csv1_2, csv1_3, csv1_4, csv1_5
3, xA, yG, U, G, xG

using dynamic SQL and decode.

I was just hoping for a more elegant solution.



Reply With Quote
  #13  
Old   
kes
 
Posts: n/a

Default Re: splitting a string into columns - 05-02-2008 , 10:18 AM




Quote:
Alex

Why does this require a stored procedure and where's the pivot?
--
Thank you for following up.

The csv1 and csv2 columns are a format for RNA sequences that have
been modified. This is why these CSV values are stored in the
database, it's usually been sufficient for our needs over the past 2
years. Now people want to see the different individual values.

e.g., xA,yG,U,G,xG

would be stored as value csv1, now people would like to see, is there
a correlation between U in the third location and this RNA sequence's
efficacy.

the reason for the pivot is I could use level in a select statement to
select
1, xA
2, yG
3, U
4, G
5, xG

then pivot it to
id, csv1_1, csv1_2, csv1_3, csv1_4, csv1_5
3, xA, yG, U, G, xG

using dynamic SQL and decode.

I was just hoping for a more elegant solution.



Reply With Quote
  #14  
Old   
joel garry
 
Posts: n/a

Default Re: splitting a string into columns - 05-02-2008 , 03:28 PM



On May 2, 8:18*am, kes <abi... (AT) gmail (DOT) com> wrote:
Quote:
Alex

Why does this require a stored procedure and where's the pivot?
--

Thank you for following up.

The csv1 and csv2 columns are a format for RNA sequences that have
been modified. This is why these CSV values are stored in the
database, it's usually been sufficient for our needs over the past 2
years. Now people want to see the different individual values.

e.g., xA,yG,U,G,xG

would be stored as value csv1, now people would like to see, is there
a correlation between U in the third location and this RNA sequence's
efficacy.

the reason for the pivot is I could use level in a select statement to
select
1, xA
2, yG
3, U
4, G
5, xG

then pivot it to
id, csv1_1, csv1_2, csv1_3, csv1_4, csv1_5
3, xA, yG, U, G, xG

using dynamic SQL and decode.

I was just hoping for a more elegant solution.
You are changing the attributes defined within the relation, so
normally you would create a new table normalized to your new
definition. Whether that is reasonable for your situation depends on
how much data you have, the updating it goes through, and what else
you want to do with it. There might be some other DW type
considerations, too.

jg
--
@home.com is bogus.
Depraved hackers! http://www.signonsandiego.com/uniont...1m2rbhack.html


Reply With Quote
  #15  
Old   
joel garry
 
Posts: n/a

Default Re: splitting a string into columns - 05-02-2008 , 03:28 PM



On May 2, 8:18*am, kes <abi... (AT) gmail (DOT) com> wrote:
Quote:
Alex

Why does this require a stored procedure and where's the pivot?
--

Thank you for following up.

The csv1 and csv2 columns are a format for RNA sequences that have
been modified. This is why these CSV values are stored in the
database, it's usually been sufficient for our needs over the past 2
years. Now people want to see the different individual values.

e.g., xA,yG,U,G,xG

would be stored as value csv1, now people would like to see, is there
a correlation between U in the third location and this RNA sequence's
efficacy.

the reason for the pivot is I could use level in a select statement to
select
1, xA
2, yG
3, U
4, G
5, xG

then pivot it to
id, csv1_1, csv1_2, csv1_3, csv1_4, csv1_5
3, xA, yG, U, G, xG

using dynamic SQL and decode.

I was just hoping for a more elegant solution.
You are changing the attributes defined within the relation, so
normally you would create a new table normalized to your new
definition. Whether that is reasonable for your situation depends on
how much data you have, the updating it goes through, and what else
you want to do with it. There might be some other DW type
considerations, too.

jg
--
@home.com is bogus.
Depraved hackers! http://www.signonsandiego.com/uniont...1m2rbhack.html


Reply With Quote
  #16  
Old   
joel garry
 
Posts: n/a

Default Re: splitting a string into columns - 05-02-2008 , 03:28 PM



On May 2, 8:18*am, kes <abi... (AT) gmail (DOT) com> wrote:
Quote:
Alex

Why does this require a stored procedure and where's the pivot?
--

Thank you for following up.

The csv1 and csv2 columns are a format for RNA sequences that have
been modified. This is why these CSV values are stored in the
database, it's usually been sufficient for our needs over the past 2
years. Now people want to see the different individual values.

e.g., xA,yG,U,G,xG

would be stored as value csv1, now people would like to see, is there
a correlation between U in the third location and this RNA sequence's
efficacy.

the reason for the pivot is I could use level in a select statement to
select
1, xA
2, yG
3, U
4, G
5, xG

then pivot it to
id, csv1_1, csv1_2, csv1_3, csv1_4, csv1_5
3, xA, yG, U, G, xG

using dynamic SQL and decode.

I was just hoping for a more elegant solution.
You are changing the attributes defined within the relation, so
normally you would create a new table normalized to your new
definition. Whether that is reasonable for your situation depends on
how much data you have, the updating it goes through, and what else
you want to do with it. There might be some other DW type
considerations, too.

jg
--
@home.com is bogus.
Depraved hackers! http://www.signonsandiego.com/uniont...1m2rbhack.html


Reply With Quote
  #17  
Old   
joel garry
 
Posts: n/a

Default Re: splitting a string into columns - 05-02-2008 , 03:28 PM



On May 2, 8:18*am, kes <abi... (AT) gmail (DOT) com> wrote:
Quote:
Alex

Why does this require a stored procedure and where's the pivot?
--

Thank you for following up.

The csv1 and csv2 columns are a format for RNA sequences that have
been modified. This is why these CSV values are stored in the
database, it's usually been sufficient for our needs over the past 2
years. Now people want to see the different individual values.

e.g., xA,yG,U,G,xG

would be stored as value csv1, now people would like to see, is there
a correlation between U in the third location and this RNA sequence's
efficacy.

the reason for the pivot is I could use level in a select statement to
select
1, xA
2, yG
3, U
4, G
5, xG

then pivot it to
id, csv1_1, csv1_2, csv1_3, csv1_4, csv1_5
3, xA, yG, U, G, xG

using dynamic SQL and decode.

I was just hoping for a more elegant solution.
You are changing the attributes defined within the relation, so
normally you would create a new table normalized to your new
definition. Whether that is reasonable for your situation depends on
how much data you have, the updating it goes through, and what else
you want to do with it. There might be some other DW type
considerations, too.

jg
--
@home.com is bogus.
Depraved hackers! http://www.signonsandiego.com/uniont...1m2rbhack.html


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.