eliminate character on the field value

jerry28ph

jerry
Local time
Yesterday, 16:54
Joined
Nov 16, 2008
Messages
141
Hi All,

I did a query about getting the length of a field value and it works for me (SQL Len()). Say phone number "94166381083" total of 11 numbers, I want to eliminate the first number on the left which is number "9" to get only the 4166381083. I'm having a problem on how to create a query to solve this. Please anyone who have an idea, i really appreciate it.
Thank you.

Best regards,
Jerry
 
Check out Right() and while checking look at Left(), Mid() and InStr() and Len() also goes there
 
Hi -

Example from the debug (immediate) window using the Mid() function:

Code:
x = "94166381083"
? mid(x,2)
4166381083

HTH - Bob
 
you could try something like
right(yourfield,len(yourfield)-1)
 
Thank you so much Raskew for your help.

I have one more question if you dont mind.
I ran a report query and the result is like this:

Phone of Callers
-----------
9062521022
2041002522
6042011021
4166381083
9062521022
9062521022
6042011021
2041002522
4166381083
4166381083
4166381083
-----------

My problem is I want to get the count of the top 3 phone number that get highest of calls. Say,

4166381083 has 4 calls,
9062521022 has 3 calls
and 2041002522 has 2 calls.

I tried to use top N but the first 3 on the row or records are displayed.
Please I'm asking again your help on this.

Thanks so much for your help.

Regards,
Jerry

---------------------------------------
Hi -

Example from the debug (immediate) window using the Mid() function:

Code:
x = "94166381083"
? mid(x,2)
4166381083
HTH - Bob
 
You were given the answer on the other thread

Group By /Count and Top 3 on the result.

And I see you have started another thread on the problem.

You also have an answer from Bob (Raskew) on the other thread.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom