In this blog post, we will learn about STRING_SPLIT function which was earlier introduced in SQL Server 2016 but still not widely adopted in the industry. We will learn today how to Split Comma Separated Value String in a Column Using STRING_SPLIT.
We have covered multiple times in this blog that we can import CSV to Database very easily. However, recently I received a very interesting question where the user wants to export data with the help of SQLCMD.
SQL SERVER – Using SSIS to Import CSV File into Salesforce Online Database with dotConnect for Salesforce from Devart
I have previously written article how one can import a CSV file into a database table using SSIS package. This was a simple import operation when the CSV file structure corresponded to the table structure column-to-column. However SQL Server Integration Services is a very powerful tool that can be used for much more complex data import CSV operations.
It is very frequent request to upload CSV file to database or Import CSV file into database. I have previously written article how one can do this using T-SQL over here SQL SERVER – Import CSV File Into SQL Server Using Bulk Insert – Load Comma Delimited File Into SQL Server.
I use following script very often and I realized that I have never shared this script on this blog before. Creating Comma Separated Values (CSV) from Table Column is a very common task, and we all do this many times a day. Let us see the example that I use frequently and its output.