Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Convert Array (Collection) to Simple Text

Updated: 21 May 2010 | 1 comment
chrisfreckmann's picture
+1 1 Vote
Login to vote

I'm trying to convert a single element array to a simple text variable.  I am returning a guid from vCollection table using a sql query and need to place brackets "{" around the guid.  Any ideas?

discussion Filed Under:

Comments

reecardo's picture
27
Apr
2009
0 Votes 0
Login to vote

If using a generated SQL

If using a generated SQL component, use something similar to:
SELECT '{' + CAST(GUID AS VARCHAR) + '}' FROM vCollection

Note that this effectively makes your GUID a string result in the query. Another option is to keep the original query, then use a Convert To Text (To String) component on your GUID. Then you can build the curly braces on your string variable with various mapping variables that have "merge text" elements.