Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / FileMaker Topics / February 2004

Tip: Looking for answers? Try searching our database.

delete last word?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dpsmojo@yahoo.com - 28 Feb 2004 04:25 GMT
I have 2 files with addresses but 1 file never has the last word
(i.e DR, ST, AVE, AV, BL, BLVD, WY, WAY, DRIVE, AVENUE, STREET, PKWY, LANE,
LN, CT, COURT ...)

I want to use them as my related field but I can't figure out how due to the
varying length of the address.  I figure if I can make a new copy of the
address field with everything BUT the last word it will be a snap.

I can't figure out how simply delete the RightWord in the new field.

Any ideas?

Thanks in advance

Deb
Helpful Harry - 28 Feb 2004 05:29 GMT
> I have 2 files with addresses but 1 file never has the last word
> (i.e DR, ST, AVE, AV, BL, BLVD, WY, WAY, DRIVE, AVENUE, STREET, PKWY, LANE,
[quoted text clipped - 11 lines]
>
> Deb

Don't "delete the last word". Simply copy everything else.  :o)
ie.
   NewAddress = LeftWords(OldAddress, WordCount(OldAddress) - 1)

I've no idea if that will work for what you're trying to do though.

Helpful Harry                  
"Hopefully helping harassed humans happily handle handiwork hardships"  ;o)
dpsmojo@yahoo.com - 28 Feb 2004 10:38 GMT
I thought of that but the problem is...the addresses can be 3, 4, 5 or even
6 words long.

I guess that I can use 'Substitute" but i will have to do it for every
possible street ending type and there will be 30 or 40 different ones.  I
was hoping there would be a way to simply truncate the last (rightmost)
word.

Deb

> > I have 2 files with addresses but 1 file never has the last word
> > (i.e DR, ST, AVE, AV, BL, BLVD, WY, WAY, DRIVE, AVENUE, STREET, PKWY, LANE,
[quoted text clipped - 20 lines]
> Helpful Harry
> "Hopefully helping harassed humans happily handle handiwork hardships"  ;o)
Matt Wills - 28 Feb 2004 11:23 GMT
Harry's suggestion returns all but the last word, regardless how many words
there are.

It does exactly what you're asking for.

Matt

> I thought of that but the problem is...the addresses can be 3, 4, 5 or even
> 6 words long.
[quoted text clipped - 33 lines]
> > "Hopefully helping harassed humans happily handle handiwork hardships"
> ;o)
Helpful Harry - 28 Feb 2004 20:41 GMT
> > > I have 2 files with addresses but 1 file never has the last word
> > > (i.e DR, ST, AVE, AV, BL, BLVD, WY, WAY, DRIVE, AVENUE, STREET, PKWY,
[quoted text clipped - 31 lines]
>
> Deb

It doesn't matter how many words there are, as long as you want
everything ecept that very last word. The part of the above function
that says:
            WordCount(OldAddress) - 1
gives you a numerical number of how many words there are minus 1. Using
that number in the LeftWords function means every word (starting from
the left) except the last (right-most) one is copied.

Helpful Harry                  
"Hopefully helping harassed humans happily handle handiwork hardships"  ;o)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.