About 452,000 results
Open links in new tab
  1. aggregate functions - Can we use SQL Server STRING_AGG () in queries ...

    Mar 29, 2023 · Aggregate functions that are used with CUBE, ROLLUP, or GROUPING SET queries must provide for the merging of subaggregates. To fix this problem, remove the aggregate function …

  2. How to use GROUP BY to concatenate strings in SQL Server?

    SQL Server 2005 and later allow you to create your own custom aggregate functions, including for things like concatenation- see the sample at the bottom of the linked article.

  3. sql - Optimal way to concatenate/aggregate strings - Stack Overflow

    SOLUTION The definition of optimal can vary, but here's how to concatenate strings from different rows using regular Transact SQL, which should work fine in Azure.

  4. How do I search an SQL Server database for a string?

    Dec 8, 2019 · I need to search an SQL Server database for all mentions of a specific string. For example, I would like to search all tables, views, functions, stored procedures, ... for string …

  5. sql - How do I split a delimited string so I can access individual ...

    Nov 2, 2015 · Using SQL Server, how do I split a string so I can access item x? Take a string "Hello John Smith". How can I split the string by space and access the item at index 1 which should return …

  6. Use string contains function in oracle SQL query

    Dec 3, 2013 · select p.name from person p where p.name contains the character 'A'; I also want to know if I can use a function like chr(1234) where 1234 is an ASCII code instead of the 'A' character in my …

  7. How to convert all UPPER CASE text to Proper Case/Title Case in SQL ...

    In SQL Server 2017 and above, you can achieve proper case by combining STRING_SPLIT, a CTE with ROW_NUMBER to maintain word order, and STRING_AGG to reassemble the string.

  8. trim and string_split don't work in SQL Server? - Stack Overflow

    Jun 21, 2019 · It's not about SSMS, it's about SQL Server version. STRING_SPLIT() is starting with 2016, and TRIM() function starting with 2017, so you need SQL Server 2017 to use both. It doesn't …

  9. Databricks SQL string_agg - Stack Overflow

    Nov 18, 2021 · Hopefully a quick one; Migrating some on-premise SQL views to Databricks and struggling to find conversions for some functions. The main one is the string_agg function. …

  10. Does T-SQL have an aggregate function to concatenate strings?

    Possible Duplicates: Is there an Implode type function in SQL Server 2000? How can I group fields from multiple records in T-SQL by another field? I have a view which I'm querying that looks like t...