Skip to Content
0
Jun 10, 2020 at 02:53 PM

Check if values in an array exist in another array using sql

1803 Views

I want to perform some operations based on, if we have some values in one array existing in another array. Following is part of my code where I am trying to handle the arrays. I have 2 arrays CL_NM[ ] and CL_NM_FIN[ ]. I would want to perform an update if a value in CL_NM[ ] doesn't exist in CL_NM_FIN[ ]. Please help me on how should I modify my code.

Here is my code

Upon trying to do this, I am getting that the column already exists error because the for loop is not going through all elements in CL_NM_FIN[ ] before going into the else condition.