AnsweredAssumed Answered

Syntax for SQL Query using Collection

Question asked by franco89 on Mar 15, 2017
Latest reply on Mar 15, 2017 by emha

Hi all,

I am using this example as a starting point to build an Insert query from SP into SQL:

Copying SharePoint list items to sql database Prasanna Adavi

 

My input values, however, are in a collection. Is it possible to use the query to grab a value from a specific index in the collection? For instance, in the linked example:

 

INSERT INTO Table1

(Column1, column 2, column 3)

VALUES(

'{WorkflowVariable:Collection*Index0*}',

'{WorkflowVariable:Collection*Index1*}',

'{WorkflowVariable:Collection*Index2*}'

);

 

I know the syntax is wrong but just wondering how i could do this, if it's even possible.

Outcomes