Question

function to count the ascii characters in a field

Rating8.0Very Good

i know i've done this before but i cannot remember how i did it.

assume i have a varchar2 column and i want to count the number of chr(44) that exist. i need to function to return the number of occurences in which the charactar occurs.


abc,dds,kdkdkdkd,


need to following to return 3.

how to do?

  1. Counting number of characters in varchar field
    I am wanting to know the sql that will allow me to determine how many characters are in certain fields of one of my Oracle tables. I have a table (t_address) with fields line_1, line_2 and line_3, and there are approx 30000 entries. I need to data convert this data into another set of tables that has different restrictions to what are currently in place, so i…
  2. create function , pl/sql
    i am trying to write a function in oracle -- which will return the count i wrote like this CREATE FUNCTION sample_function(comp_id IN NUMBER) RETURN NUMBER IS comp_count NUMBER(11,2); BEGIN select count(COlumn1) as complaint_count from y ; RETURN(com_count); END; when i am exec…
  3. Implement (a trigger?) to return record count d…
    I have 2 tables, Customer and Order There's a field in Customer table, named no_of _orders which should display the total number of orders found for that particular customer. In terms of query, no_of_orders = select count(order_id) from Order where customer_id='<specific id>' may i know how can i achieve this …
  4. query to Return the number of records and outpu…
    What I am looking to do is do a select count(*) on every column in a table where it is not null and then output it to a text file. Can someone give me an example of this and send it over. Below is what I am looking to do. BEGIN   //Perform a Query  for multiple fields:  Select count(*) from CC_TABLENAME where CC_TABLENAM…
  5. Specify number format for returned value from fu…
    How do I specify the number format for the returned variable. the following code will compile if I remove the (5,3). The view works fine in oracle but Access doesn't want to display the decimal values in a combo box and instead displays a bunch of chinese type characters when I use the results as a recordsource. I've tried con…

Solution

Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.

About this Solution
View This Solution - Start Your 30 Day Free Trial
Zone
General
Tags
count characters field
Participating Experts
1
Solution Grade
B

Replies

 
by:

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: drs66

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: actonwang

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: drs66

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: drs66

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: actonwang

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: actonwang

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: drs66

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

Stay Connected

Oracle Around the Web

The latest Oracle news, tips, and tricks

Oracle Unveils Netra SPARC T3 Servers

New Carrier-Grade Blade and Rackmount Servers Deliver Better Performance, Density and Power Efficiency for the Communications Industry ...

read more

Oracle fixes 21 flaws in Java SE, Java for Business

Oracle is fixing 21 flaws in its Java SE and Java for Business products in its February critical patch update issued this week ...

read more

Obama’s Silicon Valley “Tech Supper”

Why was he there? Who wasn’t invited and why? What did they talk about? Why was he really there? These are the questions being debated ...

read more

Featured Oracle Experts

slightwv

slightwv has answered more than 2,000 Oracle questions and oversees database management within the U.S. Government. Slightwv

sdstuber

A regular presenter at the Collaborate conference, Oracle developer sdstuber is a top expert in PL/SQL and Oracle 9, 10 and 11. sdstuber

Testimonials

What users are saying about our experts

"The Oracle gurus provide answers, solutions and valuable workarounds"

User: schwertner

"Wow! Excellent, valuable explanation. Hats off to you"

User: aseshu70

"Solution worked fantastic and performs excellent! Thanks heaps"

User: klausbrandlhuber

Top Experts

Know a thing or two about Oracle? Join our team of experts today.

    BrowseBecome an Expert