Showing results for 
Search instead for 
Did you mean: 
Nintex Newbie

Execute SQL with alias column names

Jump to solution

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

then ad4.address 
else ad1.address
end adress,
case when ad1.address IS NULL then
end 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?


Asbjørn Nielsen

Tags (2)
0 Kudos
1 Reply
Nintex Newbie

Re: Execute SQL with alias column names

Jump to solution
Hi again, just wanted to update this post with how I solved it. Instead of having the select statement in one "Execute SQL", I inserted a "Run parallel actions" and divided the statement into two different "Execute SQL". Br, Asbjørn Nielsen

View solution in original post

0 Kudos