Normal Topic Q&A search for carriage return (Read 2334 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Q&A search for carriage return
Aug 31st, 2007 at 1:34pm
Print Post Print Post  
In a few of my Q&A databases, some multi-line fields have entries that end in a dot, followed by a carriage return, followed by another dot.  I want to clean this up before importing into Sesame.

I know I can find 2 ending dots with the search syntax "]..\.\." but how do I find a carriage return?  Anyone know?

If this is not possible in Q&A, is there a way it can be done in Sesame?  If so I'll happily import the data into Sesame and search for it there.
  

**
Captain Infinity
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Q&A search for carriage return
Reply #1 - Aug 31st, 2007 at 2:46pm
Print Post Print Post  
Try this in Q&A

Go to Retrieve Spec screen
Expand the field.
line 1 enter three dots
line 2 blank
line 3 enter one dot

Like this:
Code
Select All
...

. 

Close the field, and do the search.

May not be perfect, but matches what I tested based on your description.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Q&A search for carriage return
Reply #2 - Aug 31st, 2007 at 3:04pm
Print Post Print Post  
Thanks Bob, that works great.
  

**
Captain Infinity
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Q&A search for carriage return
Reply #3 - Aug 31st, 2007 at 3:22pm
Print Post Print Post  
Well, the result set was about 2500 records, so I won't be cleaning these up one-by-one, I'll have to do a Mass Update.  Any advice on how to truncate the last 3 characters when the middle one is a carriage return?  Will @REPLLAS work, somehow?  Is there a code for a carriage return that Q&A will recognize?

For that matter, is there a code for a carriage return that Sesame would recognize?
  

**
Captain Infinity
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Q&A search for carriage return
Reply #4 - Aug 31st, 2007 at 3:41pm
Print Post Print Post  
Make a backup first.
Do a Mass Update using @Left, dropping the last three characters.

Retrieve records as above (if you believe that is working correctly).  Make note of a few records to review manually later.

Untested Update Spec:
#1= @Left(LongField,@Len(LongField)-3)

--------------------------
Confirm by opening records noted above that had the problem.
Retrieve records again, should find none.

Maybe test the update spec on one record first, and confirm it is working OK with the return code.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Q&A search for carriage return
Reply #5 - Aug 31st, 2007 at 4:02pm
Print Post Print Post  
Works great, Bob!

I changed the retrieve spec to

]..\.
\.

and after a couple of passes they were all cleaned out.  YAY!  Thanks!
« Last Edit: Aug 31st, 2007 at 5:20pm by Infinity »  

**
Captain Infinity
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Q&A search for carriage return
Reply #6 - Aug 31st, 2007 at 4:16pm
Print Post Print Post  
Yes, adding the "\" is better, well done!
Good luck over the weekend....
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged