permaculture playing cards
The moose likes JDBC and Relational Databases and the fly likes How to parse column data using select?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "How to parse column data using select??" Watch "How to parse column data using select??" New topic
Author

How to parse column data using select??

nick sharma
Greenhorn

Joined: May 05, 2008
Posts: 28
Hi
I have a small problem regarding parsing data in a column using only select statement

Say there is some data "abc;def;ghi;" in a column which needs to be displayed as

abc
def
ghi

using only select statement.

I know we can write a procedure to easily do this but i would like to know how it can be done using only select whether nested or inline.I tried using string functions but couldn't think of some logic to do it

Thanks
Nikhil
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32481
    
214

Nikhil,
I think you'll need the procedure (or database specific functions). Basic SQL doesn't have a loop function.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to parse column data using select??
 
It's not a secret anymore!