dbTalk Databases Forums  

Escape characters in 'Retrieve'

comp.databases.pick comp.databases.pick


Discuss Escape characters in 'Retrieve' in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Escape characters in 'Retrieve' - 04-27-2006 , 07:51 AM






Hi,
Is it possible to escape the standard character patterns when using the
LIKE search in Retrieve?

I wish to search for a specific value: '49x Vanguard Street' in the
column ADDRESSS, in a file called PROPERTY.

However, every when I use ADDRESS LIKE "49x Vanguard Street" it doesnt
match my record. This is because universe takes the 49x to mean 49
characters long.

And I cant see any way to escape this behaviour.. surely it exists..
but its not in the docs..
I've tried various combinations of \ and & but no luck.

Can anyone help
Thanks,
Graeme.


Reply With Quote
  #2  
Old   
Allen Egerton
 
Posts: n/a

Default Re: Escape characters in 'Retrieve' - 04-27-2006 , 08:09 AM






graeme.robb (AT) gmail (DOT) com wrote:
Quote:
Hi,
Is it possible to escape the standard character patterns when using the
LIKE search in Retrieve?

I wish to search for a specific value: '49x Vanguard Street' in the
column ADDRESSS, in a file called PROPERTY.

However, every when I use ADDRESS LIKE "49x Vanguard Street" it doesnt
match my record. This is because universe takes the 49x to mean 49
characters long.

And I cant see any way to escape this behaviour.. surely it exists..
but its not in the docs..
I've tried various combinations of \ and & but no luck.

Can anyone help
Thanks,
Graeme.

Not exactly what you're asking, but perhaps
SELECT PROPERTY WITH ADDRESS LIKE "49... Vanguard Street"
or
SELECT PROPERTY WITH ADDRESS = "49x Vanguard Street"
where the first is going to do matching, and the second is going to do
an exact check.

I'd test these for you, but I don't have a machine running universe
handy at the moment...


--
Allen Egerton
aegerton at pobox dot com


Reply With Quote
  #3  
Old   
Martin Kent
 
Posts: n/a

Default Re: Escape characters in 'Retrieve' - 04-27-2006 , 08:19 AM



LIST ADDRESS LIKE "'49X' Vanguard Street"

(49x enclosed in single quotes) works on Universe


Reply With Quote
  #4  
Old   
AT
 
Posts: n/a

Default Re: Escape characters in 'Retrieve' - 04-27-2006 , 08:21 AM



Thanks Allen,

Unfortnuately I require the wild card after the 'Vanguard' in both
cases. (ie match Vanguard street and Vanguard road)
This means I have to use the 'like' keyword.. but when I use like it
interprets the '49x' to mean 'all strings with 49 characters' .. so I'm
unable to get it to find records with the literal value '49x'.


Reply With Quote
  #5  
Old   
Richard Wilson
 
Posts: n/a

Default Re: Escape characters in 'Retrieve' - 04-27-2006 , 08:25 AM



try this

LIST filename WITH ADDRESS LIKE "'49'...'Vanguard Street'"

Rich

graeme.robb (AT) gmail (DOT) com wrote:

Quote:
Hi,
Is it possible to escape the standard character patterns when using the
LIKE search in Retrieve?

I wish to search for a specific value: '49x Vanguard Street' in the
column ADDRESSS, in a file called PROPERTY.

However, every when I use ADDRESS LIKE "49x Vanguard Street" it doesnt
match my record. This is because universe takes the 49x to mean 49
characters long.

And I cant see any way to escape this behaviour.. surely it exists..
but its not in the docs..
I've tried various combinations of \ and & but no luck.

Can anyone help
Thanks,
Graeme.



Reply With Quote
  #6  
Old   
AT
 
Posts: n/a

Default Re: Escape characters in 'Retrieve' - 04-27-2006 , 08:26 AM



Spot on. This is exactly what I needed
Thanks very much.


Reply With Quote
  #7  
Old   
Dave Mitchell
 
Posts: n/a

Default Re: Escape characters in 'Retrieve' - 04-27-2006 , 09:37 PM



I haven't seen this solution yet.....

Try:

SELECT PROPERTY WITH ADDRESS = "49]" AND WITH ADDRESS = "[VANGUARD ST"

The [ and ] are wildcard characters meaning (I think) leading and trailing
characters of any sort, but you use the = sign rather than the LIKE
operator. I ran into a similar problem as you are having using LIKE a
couple of years ago, and was shown this method. Been using it ever since.

The above example will return addresses like:

49x VANGUARD ST
49y VANGUARD ST
4987 VANGUARD ST

and so on. If you just want to match the beginning and/or end of a string,
you can do it without the second WITH clause:

SELECT PROPERTY WITH ADDRESS = "[VANGUARD]"

will return everything with VANGUARD in its address.

Hope this helps.

Mitch


<graeme.robb (AT) gmail (DOT) com> wrote

Quote:
Hi,
Is it possible to escape the standard character patterns when using the
LIKE search in Retrieve?

I wish to search for a specific value: '49x Vanguard Street' in the
column ADDRESSS, in a file called PROPERTY.

However, every when I use ADDRESS LIKE "49x Vanguard Street" it doesnt
match my record. This is because universe takes the 49x to mean 49
characters long.

And I cant see any way to escape this behaviour.. surely it exists..
but its not in the docs..
I've tried various combinations of \ and & but no luck.

Can anyone help
Thanks,
Graeme.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.