This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hi, I am storing a callerid number in a table.I need to get only the last 7 digits from the callerid and i have to display it.for example if i am storing 043255667778.i have to get 5667778 and to display it.how can i do this?using substring?please help me to do this.
Thanks
amitabh mehra
Ranch Hand
Joined: Dec 05, 2006
Posts: 98
posted
0
From what I understood from your description is that you are storing a caller id in some database table as a varchar. And later, after retrieving you want to display the last 7 digits using substring function.
If this is correct then you can try: (assuming you fetched the string in str variable of type string)
thanks.it is working. [ May 28, 2008: Message edited by: preethi Ayyappan ]
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
posted
0
Alternatively, you could do this directly in SQL. Depending on the number of records you are retrieving, this might reduce the network bandwidth consumed by the database query.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus