‎2007 Jun 20 7:33 AM
Hi Friends..
If i will give 5* in select statement i want to display all the records start from 5
if i will give 50* in select statement i want to display all the records start from 50
for that scenario what can i do..
can any one explain..
Thanks
Gowrishankar.
‎2007 Jun 20 7:38 AM
Hi
Use % symbol in where condition of the select statement
SELECT MATNR FROM MARA WHERE MATNR = '5%'.
IT WILL PICKUP ALL MATERIALS STARTING WITH 5..
Reward points for useful Answers
Regards
Anji
‎2007 Jun 20 7:36 AM
hi..
better u use <b>' 5%' and %50%</b> instead of 5* and 50*..
if u use 5% and 50% it will work properly..
Thanks
Ashu
‎2007 Jun 20 7:38 AM
Hi ,
Get the data in a variable, concatenate it with % and then use like statement in where clause in select statement.
concatenate '5' '%' into var.
Select * from table into itab where field like var.
Regards,
Sumit
‎2007 Jun 20 7:38 AM
Hi,
First case
WHERE Field LIKE '5%'.
Second case
WHERE Field LIKE '50%'.
Regards,
Ranjit Thakur.
<b>Please Mark The Helpful Answer.</b>
‎2007 Jun 20 7:38 AM
Hi
Use % symbol in where condition of the select statement
SELECT MATNR FROM MARA WHERE MATNR = '5%'.
IT WILL PICKUP ALL MATERIALS STARTING WITH 5..
Reward points for useful Answers
Regards
Anji
‎2007 Jun 20 7:44 AM
ok friends thanks for your reply..
one small correction.
If i will give the input in select-option at that time i want to disp[lay all the value.
if i give 5* or 5% means,i want the output like,,
all the numbers start from 5.
‎2007 Jun 20 7:39 AM
HI,
In the select statment you need to use % symbol to get al the records statrts from .....
SELECT * from TABLE INTO ITAB WHERE NAME like '5%'.
Regards
Sudheer