Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

query

Former Member
0 Kudos
279

hello gurus,

I am having an text in the input fiedl based on that i

am searching the fields

I ant to use the %

how can i retirieive it based ont that

CONCATENATE '%' reason_text '%' INTO reason_text.

SELECT * FROM table INTO CORRESPONDING FIELDS OF TABLE close_reason

WHERE reason_text CP reason_text.

it throws an error meesage

how can i do it

senthil

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
257

HI Senthil

For Patterns: Use LIKE for comparision.

Eg:

select fld1 fld2.... into table itab
     from <itab>
     where fld1 LIKE 'PAT%'.

In your case it should be:

CONCATENATE '%' reason_text '%' INTO reason_text.

SELECT * FROM table INTO CORRESPONDING FIELDS OF TABLE close_reason

WHERE reason_text <b>LIKE</b> reason_text.

Kind Regards

Eswar

3 REPLIES 3
Read only

Former Member
0 Kudos
258

HI Senthil

For Patterns: Use LIKE for comparision.

Eg:

select fld1 fld2.... into table itab
     from <itab>
     where fld1 LIKE 'PAT%'.

In your case it should be:

CONCATENATE '%' reason_text '%' INTO reason_text.

SELECT * FROM table INTO CORRESPONDING FIELDS OF TABLE close_reason

WHERE reason_text <b>LIKE</b> reason_text.

Kind Regards

Eswar

Read only

0 Kudos
257

thanx for u r replies

senthil

Read only

Former Member
0 Kudos
257

Hi Senthil,

You could make use of the LIKE addition in the SELECT statement,

SELECT * FROM table INTO CORRESPONDING FIELDS OF TABLE close_reason

WHERE reason_text LIKE reason_text.

Please make your queries more informative

Regards

Wenceslaus