Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Concatenating and remove last comma

summarizer
9 - Comet

I'm trying to do a dynamic input where it takes results from part of my workflow and replaces a string in my SQL code with that answer, so that I can then search another database.

 

For instance, I have a column of case numbers:

1111
2222
3333
4444

 

and I need that column to make a single string like so:

'1111', '2222', '3333', '4444'

 

I can kindof do it with a Formula to add the quotes and a Crosstab to concatenate them into a long string BUT I am not sure how to NOT have a last comma at the end which will cause my SQL code not to work.

 

I think there might be a RegEx fix, but I can't think of how to make it work.

 

Thanks for any assistance!

3 REPLIES 3
patrick_digan
17 - Castor
17 - Castor

@summarizer What about using a summarize tool like so? The concatenation properties at the bottom seem to get what you want.

Capture.PNG

summarizer
9 - Comet

Looks amazing!  I think that will do!  Thanks!

LoganLugoAnalytics
8 - Asteroid

Hi Patrick!

 

By curiosity, is there a way to do this through the in-database formula tool?

Labels
Top Solution Authors