Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace command and NULLs
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00615586
Message ID:
00615589
Views:
21
Try:
=seek(m.lcCond,'BldMstr')
replace Street with m.lcNewStreetName, ;
               ccode with m.lcNewCode, ;
		town with m.lcNewTown, ModiType with 'C', ;			
		(.cWorkField) with .cReplVal ;
		while upper(ccode+town+Street=m.lcCond in BldMstr
It uses the index explicitly so you don't need to worry about Rushmore.

HTH.

>Hi everybody,
>
>I have the following replace statement:
>replace Street with m.lcNewStreetName, ;
>               ccode with m.lcNewCode, ;
>		town with m.lcNewTown, ModiType with 'C', ;			
>		(.cWorkField) with .cReplVal ;
>		for upper(ccode+town+Street+str(StNum,4)+StNumExt+Unit)= ;
>m.lcCond in BldMstr
>
>Set exact is set to off, because I want to replace old street names with the new street names regardless of StNum or StNumExt. However, if StNumExt is NULL, this replace command doesn't work.
>
>We have situs index in the table, which is exactly
>upper(ccode+town+Street+str(StNum,4)+StNumExt+Unit)
>
>Could you please advise, what should I do, to make the replace command work for NULL in Unit or StNumExt as well?
>
>Thanks a lot in advance.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform