but I have one issue with that… and its. if name is like…
Anders
Anders Morten
Tim Morten Andersen
Tomy Andersen
Then the regular expression I’m using is showing only name ( Tim Morten Andersen) and its not showing 1,2 and 4th user name.
Which is also correct as its matching [A-z]+ only one user with 3 name part…
How can i make this regular expression so that it both show value of either its only writen Anders or Anders Morten or Tim anders Morten andersen or Tomy andersen.
Your this expression is good but its shows me more value out and I dont want to use split again.
System.Text.RegularExpressions.Regex.Match(currentText,“(?<=Line3);(?=;)”).ToString
Insert into TABLE
(InvoiceID, UserNames)
Value (@invoiceId, @listofUsers)
My parameter is @listofUsers - In - List - ListOfUsers @InvoiceId - in - String - varInvoiceid
It’s giving me errror:
Execute Query: No mapping exists from object type System.Collections.Generic.List[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] to a known managed provider native type.
I tried with database as well as you said … Its working means I had success with writting all usernames into one DB column.
Result in DataBase column shows as:
ListOfUserNames Anders ppr tim
Issue is:
It’s adding buildDT column name “ListOfUserNames” into DB column with 3 usernames as well.
Plus I needed a comma in between each name så that it seperate and show that this column holds three person name.
You don’t insert a list directly into a SQL database. You loop through the list and use Add Data Row to put them into a datatable then you pass that datatable to the Insert activity.
If you want to insert the list into one column in a database row, then use String.Join on the list to make it a comma delimited string, and use that in your insert query.