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): 4049/ 187

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

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 8 and 6 and type the answer here:

User Comments

No comments posted yet.






Ads Powered by Lake Quincy Media
Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2008 ASPAlliance.com  |  Page Processed at 9/7/2008 10:35:32 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search