Quantcast
Channel: SCN : Discussion List - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 4237

Help needed on SQL script

$
0
0

Hi,

I am a bit new to data services and need some help in understanding how to write a script.

 

The scenario is explained as below:

There is a table having 2 columns as below:

 

Column A is of datatype Varchar.

 

COLUMN_ACOLUMN_ B
100xxx
a900x
abc200xxxx
dasds47xxxxx

 

Now, I need to fill a variable $Count with the maximum number of characters that any rows of column A has.

As in this case dasds47 has the most number of characters ('dasds') which is equal to 5.

 

The logic I am thinking is to loop on the table and again loop on the string to check if 1st letter is a number or not

(substr( TABLEA.COLUMN_A,1,1 )>='0') AND (substr( TABLEA.COLUMN_A,1,1)<='9')

 

Similarly check each character of each string until the length of string.

 

I know ABAP but am new to scripting in BODS.. can someone please help me in writing the logic.. I have no idea on how the syntax should be.


Viewing all articles
Browse latest Browse all 4237

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>