‎2007 Jun 07 7:39 AM
Hi All,
Why is the below statment not fetching any data?
SELECT * FROM t012k INTO TABLE gt_t012k WHERE bankn EQ '%15%'.
Data is present in the table T012k having bankn = %15%.
Thanks,
Rakesh.
‎2007 Jun 07 7:40 AM
Hi
SELECT * FROM t012k INTO TABLE gt_t012k WHERE bankn EQ '%15%'.
Use :
SELECT * FROM t012k INTO TABLE gt_t012k WHERE bankn<b> LIKe</b> '%15%'.
Regards,
Sree
‎2007 Jun 07 7:42 AM
SELECT * FROM t012k INTO TABLE gt_t012k WHERE bankn <b>like</b> '%15%'.
regards
shiba dutta
‎2007 Jun 07 7:44 AM
When you want to USE % in where clause use LIKE.
Regards,
Sai Ram
‎2007 Jun 07 7:44 AM
‎2007 Jun 07 7:44 AM
Hi
In SQL the symbol % is used to get LIKE fields
say 'AB%' means all fields starting with AB to be fetched.
Ensure that there is data in the table with this field '%15%'. then
Declare a constant
<b>Constants: v_bank like t012k-bankn value '%15%'.
data gt_t012k like t012k occurs 0 with header line.</b>
then see the select statement:
<b><b>SELECT * FROM t012k INTO TABLE gt_t012k
WHERE bankn = v_bank.</b></b>
Reward points for useful Answers
Regards
Anji
‎2007 Jun 07 7:45 AM
‎2007 Jun 07 7:50 AM
hi
With character type variables u could use co(contain only) cs(contain string) ..
Thanks
Dinesh