Imported memo field

seat172

Registered User.
Local time
Yesterday, 19:20
Joined
Jun 30, 2004
Messages
25
Hi, i have a fox pro memo field that has bill of materials information in like so:EACH KIT COMPRISES

1 CR10070SW £29.60 HALLITE PRODUCT
1 RBS24690 £0.82
1 RBS354 £0.95
2 RBS345 £0.75
1 S95MMEXT £3.90


£36.77 PER KIT

I need to take out the carriage returns but keep the items delimited in some way so they all apear on the one line. These are the child parts for kits so i need to keep them on one line as i import them or via a query so i can see the parent part they belong to.

Many Thanks
 
this code will do the job

public function stripCR(strInput as string) as String
dim i as integer
dim strResult as string
dim strChar as string * 1

for i = len(mystring)
strChar=mid$(mystring,1,i)
if strChar<> asc(13) then
stResult=strResult & strChar
next

stripCR=strResult
end function
 
Memo field

Thanks, but that misses me by about mile. Just bought an SQL book yesterday as i have been trying to avoid it as long as possible. Learning SQL leaves no time for fishing!:D It's all a matter of priorities.

Give a man a fish and feed him for a day, teach him to fish and he can sit around and drink more beer!
 
I would probably replace the CarriageReturn, or CrLf sequence with a delimiter of some kind like the virtical bar "|".
 

Users who are viewing this thread

Back
Top Bottom