Posts tagged sql server

Split CSV string into multiple rows in SQL Server (MSSQL)

To split a string into multiple rows using a separator, use the the SPLIT_STRING table-valued function. This is very useful in situations where one column is holding a comma serpareted list of values. Another very common situation is a passing configuration from external tools - e.g. Azure Data Factory passes a list of tables to be processed.

Read more ...


Disable all non-clustered indexes for a table in SQL Server

Building on Get a List of Table Indexes in SQL Server here is a SQL script which allows you to disable all non-clustered indexes for a table in SQL server. In the following example, use build a DDL statement which disables all non-clustered indexes for a table:

Read more ...


Get a List of Table Indexes in SQL Server

Following SQL Server statement will return a list of all index names for a table dbo.sales.

Read more ...