Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using RTRIM on a dbf field
Message
From
26/11/2000 23:18:46
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00445498
Message ID:
00445555
Views:
15
Peter,

>Thanks Cindy:
>
>I have been reading the help files for the past 5 days and trying to find solutions using any of the 'Trim' functions to produce the results I needed. I must be missing something since Larry's suggestion:
>
>Try right(rtrim(lastname),3)
>
>did not appear in the help files I was looking at.
>
>I could not find any help examples suggesting using the word 'right' before 'rtrim'.


The help files (Index) tell how to apply the syntax of the command. Details like the first parameter of RIGHT() is the field you are operating on and the second parameter is the number of characters from the right that you want to return.

The help files (Index) do not tell how to solve problems - like how to get the last 3 letters of the last name, or whether this is an effective strategy for finding duplicate names. You might spend time familiarizing yourself with all of the character functions. (Put "character functions" in the Search.) Also, they don't show every way that things can be done. We as developers supply a lot of creativity in applying our "bag of tricks" to our situations. Assume theres about 10 more ways to do any one thing than what FoxPro help shows you.

For finding duplicates, I was surprised by your method. I don't know whether the method is set in stone, but there are other ways. Fox example, look at the SOUNDEX() function. It's designed to make Smith and Smythe evaluate the same, for the purpose of looking at all possible spellings of a spoken name. You could also use it to search for duplicates where the name has been misspelled. For example, my last name is often misspelled Weingarten. If you used SOUNDEX() and compared zip codes or something you would have another way to pick out records that would then be eyeballed by a human.

There are a lot of folks around here that handle names and addresses. You might do some searching of the archives and some reading.


>I think at times my experience with Access is confusing my efforts to understand expressions in FoxPro. So far I'm finding that trying to apply Access expressions to FoxPro is making things too complicated. It appears that FoxPro expressions are much more refined and to the point.


Access is designed as an end-use tool, and not as a tool for developers. Consequently, in its efforts to help out it makes a lot of assumptions for you. FoxPro makes fewer assumptions and gives you more control. Consequently, you have more commands to learn and more decisions to make.

>
>Thanks
>
>Peter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform