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

Functions in SQL query

Former Member
0 Likes
408

Hello Xperts,

I need to write a select query which will give me the length of the string value stored in the field.

At present I have to read all values from the table and then loop at each value into workarea to find length of each field.

Is there any alternative to this? I am querying a table with more than 300K records and I do not want to loop at 300K records to find the desired field.

Any help is highly appreciated.

Ashutosh

2 REPLIES 2
Read only

former_member156446
Active Contributor
0 Likes
367

I guess loop is mandatory to check each field....

loop at itab assigning <fs>.

assign components sy-index of structure <fs> to <fs_fied>.

find string length...

endloop.

Read only

0 Likes
367

I found the workaround..

Select ......... where column not like '__________'.

This gives me the field which has lenght more than or less than 10 characters.

-Ashutosh