Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

create extra column/mark column if match found in table a vs table b with loops

$
0
0

Hi,

 

Would be really nice if someone could help me out on the following problem. There are 2 tables: table A vs. Table B. where certain columns are the same. I have tried to make a loop to take out or at least mark the matches in an extra column.

 

The procedure that i want: take the 1st row from table A. and loop over table B for matches, if found than marked in extra column (only for the first match, other matches could be ignored).

 

i have tried an IF function in the for loop like:

 

FOR v_column_rowA in a..(:v_max_row_columnA) DO

    

     FOR v_column_rowB in a..(:v_max_row_columnB) DO

 

               IF(:v_c_columnA[:v_rowA] = v_d_columnB[v_rowB])

               THEN v_c_extracolumn[:v_column_rowA] := mark;

                          v_c_extracolumn[:v_column_rowB] := mark;

 

 

i do get data in return but there are no matches to be found. it kinda look like random numbers. Any know how to do this?

 

Please tell me,Thanks!


Viewing all articles
Browse latest Browse all 6412

Trending Articles



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