Wednesday, 11 September 2013

Wild Card Search in Select Statements

for suppose you need wild card search parameter like

data:patient(10)  type c.

search : a*

TRANSLATE  patient TO UPPER CASE.
replace all occurrences of  '*'  in patient with '%'.

select a
           b
           c
            into table itab
           where  A like patient.


With queries, I think its possible to use just the wild card '%'.
Say N%, then it retrieves data starting with N
%N% retrieves data which has N anywhere in between
%N retrieves data ending with N.

No comments:

Post a Comment