Hi, quick question regarding Execute SQL. My query contains an additional verification from the same column, so I'm using alias name:
select (some columns),
case when ad1.address IS NULL
case when ad1.address IS NULL then ad4.zip
from customer cu
left outer join address ad1 on cu_number = ad1.customer and ad1.type = 1 and ad1.expire_date is null
left outer join address ad4 on cu_number = ad4.customer and ad4.type = 4 and ad4.expire_date is null
where = (item property)
group by (all related columns from the select)
For each column, I'm storing the outcome with different collection operations (Collection variable to Text variable) on the same index, but the workflow returns the following error: "Error operating on collection variable. Index property is greater than the number of items in the collection."
The SQL works perfectly without the extra alias (ad4) so I'm guessing it has something to do with it. I have tried different solutions without any luck. How do a beginner like me solve this issue?
Solved! Go to Solution.