CodeSnip: Practical Use of Translate Function in Oracle
page 3 of 4
by Deepankar Sarangi
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 19742/ 49

Analysis

Here I have tried to find out the number of commas in a row. Notice that "n" numbers of names have been stored as a string being separated by n-1 numbers of commas in between. So each string is having n (n-1 +1) names. Any string having at least one name without any comma cannot even skip the logic.

Listing 2

select id,sum(length(name)-length(translate(name,' ,',' '))+1)NAME 
from multiple_id group by id;

Figure3


View Entire Article

User Comments

No comments posted yet.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-25 7:45:32 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search