I have a string value separated by the delimiters like:
abc#def#ghi#jkl#$mno#pqr#stu#vwx#$............
I want to parse the above string in a stored procedure so that i can insert each value separated by # in a particular column.
So how can i achieve this??
Thanks , Jignesh
Regards,
Jignesh
The Art Of Life Is To Know When To Be Useless And When To Be Useful - CHUANG TZU
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35237
7
posted
0
That depends on which DB you use, because each has its own stored proc syntax.
I would advise to do this kind of processing outside of the DB, though, as it has nothing to do with storing/retrieving data. You don't want to change stored procs if the data format changes.
Hi Jignesh You could make use of StringTokenizer class, since the "#" is being used as a delimiter and parse your string accordingly.
hth, cheers vinny m
Regards,Vinny M.
proud Fan of European Champion CHELSEA FC
"If you don't see the bug where you're looking, perhaps you're looking in the wrong place" -James Gosling