Matching character

Kalan

Member
Hi all,

I need to find the character '* or ? or X' - single separate character in character string. if we use address = '*' then it will be always true if any data available in address field. How can we exactly check the character '*' or '?' or any single character?

Pls suggest.

Thanks.
 

suny

ProgressTalk.com Sponsor
Use the '~' character:
address matches "~*"
or
address matches "~?"
 

TomBascom

Curmudgeon
Hi all,

I need to find the character '* or ? or X' - single separate character in character string. if we use address = '*' then it will be always true if any data available in address field. How can we exactly check the character '*' or '?' or any single character?

Pls suggest.

Thanks.

I think you need to post some actual code. Comparisons don't work the way that you seem to think that they work. In particular the "=" operator does not recognize wild cards at all. So you are either:

1) Not using the "=" operator.

2) Not using 4gl (maybe you are using SQL?).

3) You haven't actually tried any code yet.

4) You are trying to do something completely different from what your post seems to be saying you are trying to do.

Code:
create customer.
name = "*".

for each customer where name = "*" or name = "?" or name = "X":
  display customer.
end.
 
Top