Timeline for TSQL - create a function that takes a multi-row query result as an argument
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 7, 2018 at 15:06 | answer | added | Solomon Rutzky | timeline score: 3 | |
Sep 7, 2018 at 13:10 | comment | added | Emily Smirle | @SolomonRutzky Mostly policy: our clients are being upgraded to Azure SQL so it's a solution that will only last for a little while and then I'll have to go back and change everything. | |
Sep 7, 2018 at 9:01 | history | tweeted | twitter.com/StackDBAs/status/1037989118096101377 | ||
Sep 7, 2018 at 5:01 | comment | added | Solomon Rutzky | @EmilySmirle Why don't they allow SQLCLR? Is it technical (they're using Azure SQL Database, which doesn't support SQLCLR), or just policy? If the former, then there isn't much to be done about that. But if policy, then that can potentially be changed :). I've found that most places that prohibit SQLCLR don't really understand it and have relied on either misinformation or a lack of information in coming up with that policy. Just a thought as it is the easiest way, outside of upgrading to SQL 2017 to get STRING_AGG | |
Sep 6, 2018 at 22:36 | history | edited | Emily Smirle | CC BY-SA 4.0 |
added 2805 characters in body
|
Sep 6, 2018 at 22:03 | comment | added | Emily Smirle | @sp_BlitzErik ingest the list and transform it into a single string and return that. | |
Sep 6, 2018 at 22:02 | comment | added | Emily Smirle | @Scsimon Yes, I already know how to do that. That's the boilerplate code, including FOR XML PATH('') and everything. The question isn't "how do I concatenate a list into a comma separated list", it's "how do I make a function or something so my code can be clearer?" | |
Sep 6, 2018 at 20:45 | comment | added | S3S |
It seems like you'd want to return FirstName LastName, FirstName2 LastName2, etc... meaning each row is added with a comma, correct? If so, you can use STUFF . Here is an example of that
|
|
Sep 6, 2018 at 20:43 | comment | added | Erik Reasonable Rates Darling | Is the point to ingest and do something with the list, or just display it? | |
Sep 6, 2018 at 20:40 | review | First posts | |||
Sep 7, 2018 at 2:14 | |||||
Sep 6, 2018 at 20:39 | history | asked | Emily Smirle | CC BY-SA 4.0 |