Sign Up |  Live StatsLive Stats    Articles 34,880| Comments 154,870| Members 17,230, Newest IronSingh25| Online 310
Home Contact
 (Forgotten?): 
    Sikhism

   
                                                                     Your Banner Here!    

 
 
  
  
Sikh Philosophy Network » Members Lounge » Information Technology » Parsing string from Right to Left

Parsing string from Right to Left

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 400 USD, Received: 25 USD (6%)
Please Donate...
Related Topics...
Thread Thread Starter Forum Replies Last Post
How do I exclude if text string inside string - ACCESS Wheelz Information Technology 1 28-Jul-2006 08:37 AM
parsing a string with multible colons SAC Information Technology 1 28-Jul-2006 08:14 AM
Re: Parsing a Timestamp Scottie Information Technology 1 28-Jul-2006 08:00 AM
Parsing Name Fields iholder Information Technology 2 19-Nov-2005 22:00 PM
Parsing names in a field Scoop Information Technology 3 07-Nov-2005 11:25 AM


Tags
parsing, string, right, left
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:08 AM
JoeA2006's Avatar JoeA2006
Guest
 
Posts: n/a
   
   
Parsing string from Right to Left

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
How can I create a substring of the characters to the right of the last
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/9912-parsing-string-from-right-to-left.html
blank space in the string. I would like to be able to use an expression to do
this in query designer.
Thanks

*








 
Do share your immediate thoughts or reactions on this issue? We value your views! Login Now! or Sign Up Today! to share your views with us.. Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:08 AM
Ofer Cohen's Avatar Ofer Cohen
Guest
 
Posts: n/a
   
   
RE: Parsing string from Right to Left

Try using InStrRev to do it

Right([FieldName],InStrRev ([FieldName]," ")-1)

--
Good Luck
BS"D


"JoeA2006" wrote:
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9912

> How can I create a substring of the characters to the right of the last
> blank space in the string. I would like to be able to use an expression to do
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9912
> this in query designer.
> Thanks

Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:08 AM
JoeA2006's Avatar JoeA2006
Guest
 
Posts: n/a
   
   
RE: Parsing string from Right to Left

This expression truncated the first n of characters returned from the
InStrRev from the begining of the field.

My data looks like this:
xxxxxxxx xxxxxxxx xxx-x

this expression returns
xxx xxxxxxxx xxx-x

what I need to see is
xxx-x

Do I need to change something in the expression?





"Ofer Cohen" wrote:

Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9912
> Try using InStrRev to do it
>
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9912
> Right([FieldName],InStrRev ([FieldName]," ")-1)
>
> --
> Good Luck
> BS"D
>
>
> "JoeA2006" wrote:
>
> > How can I create a substring of the characters to the right of the last
> > blank space in the string. I would like to be able to use an expression to do
> > this in query designer.
> > Thanks

Reply With Quote
  #4 (permalink)  
Old 28-Jul-2006, 08:08 AM
Douglas J Steele's Avatar Douglas J Steele
Guest
 
Posts: n/a
   
   
Re: Parsing string from Right to Left

  Donate Today!  
While InStrRev looks from right-to-left, the value it returns is still the
character count from the left.

In other words, if you're trying to find the last blank in the string, you'd
use

InStrRev(MyString, " ")

For the case you're citing, that would return 18.

To only get what's after that space, you want:

Mid(MyString(InStrRev(MyString, " ") + 1)


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"JoeA2006" wrote in message
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9912
news:9610C7C8-F8EE-4132-BD50-F8291411D555@microsoft.com...
> This expression truncated the first n of characters returned from the
> InStrRev from the begining of the field.
>
> My data looks like this:
> xxxxxxxx xxxxxxxx xxx-x
>
> this expression returns
> xxx xxxxxxxx xxx-x
>
> what I need to see is
> xxx-x
>
> Do I need to change something in the expression?
>
>
>
>
>
> "Ofer Cohen" wrote:
>
> > Try using InStrRev to do it
> >
> > Right([FieldName],InStrRev ([FieldName]," ")-1)
> >
> > --
> > Good Luck
> > BS"D
> >
> >
> > "JoeA2006" wrote:
> >
> > > How can I create a substring of the characters to the right of the

last
> > > blank space in the string. I would like to be able to use an

Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9912
expression to do
> > > this in query designer.
> > > Thanks



Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Gurbani Jukebox
Listen to Gurbani while surfing SPN!
» Recent Discussions
sikhism What Prayer Does to Your...
Today 12:21 PM
3 Replies, 274 Views
sikhism Four Steps To God
Today 12:11 PM
2 Replies, 230 Views
sikhism Benti Chaupai - Keertan...
Today 11:53 AM
17 Replies, 265 Views
sikhism Fools Who Wrangle Over...
Today 11:46 AM
917 Replies, 77,921 Views
sikhism Incidental Happiness...
Today 10:24 AM
1 Replies, 75 Views
sikhism Meditate - How, What,...
Today 08:30 AM
41 Replies, 1,190 Views
sikhism Are Nihangs: A Legacy...
Today 08:12 AM
15 Replies, 268 Views
sikhism Sukhmani Sahib Astpadi 8...
Today 06:38 AM
0 Replies, 25 Views
sikhism Is Hindu/Sikh a Valid...
Today 02:20 AM
82 Replies, 1,481 Views
sikhism Undercover Mosque
Today 01:10 AM
0 Replies, 55 Views
sikhism Amazing truth!
Yesterday 22:20 PM
0 Replies, 72 Views
sikhism Black money: Indians...
Yesterday 21:40 PM
1 Replies, 60 Views
sikhism Sikh temple brawl a...
Yesterday 20:33 PM
0 Replies, 67 Views
sikhism Turban Cloth
Yesterday 20:32 PM
3 Replies, 105 Views
sikhism A village where every...
Yesterday 19:12 PM
0 Replies, 51 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.2

All times are GMT +6.5. The time now is 12:27 PM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.35482 seconds with 30 queries