Assign Column Content from 'Dataset Loop' in separate variables
Posted: Wed Oct 19, 2022 11:17 am
Hello,
I am using the step 'Dataset Loop' to query data from a view in a MS SQL Database.
The view has the following structure:
Company - Contact - Country
A - Mr. A - Germany
B - Mr. B - France
C - Mrs. C - Belgium
At the moment I can assign the field values into one variable.
So the first loop will assign 'A,Mr. A,Germany' to my variable when I use query 'select * from view'.
I need the values of each column in a separate variable because I need to calculate with values or compare them.
So today I am using separators between each column and my query looks like 'select A1, Company, A2, Contact, A3, Country, A4 from view'. That makes it possible to get the values I need with the step 'STR Between'.
I think I could also use conversion from comma-text to multi line text and assign each line to a varible but that also seems very cumbersome.
I would like to be able to assign the columns to a variable in the 'Dataset Loop' step.
For example:
Column - Variable
Column 1 - COMPANY
Column 2 - CONTACT
Column 3 - COUNTRY
Column n - ...
Is there currently such a function or is it possible to create it?
I am using the step 'Dataset Loop' to query data from a view in a MS SQL Database.
The view has the following structure:
Company - Contact - Country
A - Mr. A - Germany
B - Mr. B - France
C - Mrs. C - Belgium
At the moment I can assign the field values into one variable.
So the first loop will assign 'A,Mr. A,Germany' to my variable when I use query 'select * from view'.
I need the values of each column in a separate variable because I need to calculate with values or compare them.
So today I am using separators between each column and my query looks like 'select A1, Company, A2, Contact, A3, Country, A4 from view'. That makes it possible to get the values I need with the step 'STR Between'.
I think I could also use conversion from comma-text to multi line text and assign each line to a varible but that also seems very cumbersome.
I would like to be able to assign the columns to a variable in the 'Dataset Loop' step.
For example:
Column - Variable
Column 1 - COMPANY
Column 2 - CONTACT
Column 3 - COUNTRY
Column n - ...
Is there currently such a function or is it possible to create it?