SQL Server 2016 came out with the STRING_SPLIT function that will return what amounts to a table from character-separated string. Using a CROSS JOIN with this function, you can return one row multiple times with whatever values you want!
Author: Randy Sims
Review: SQL Operations Studio (Preview) for SQL Server
As someone who develops on SQL Server every day, I wanted to try it out the latest gizmo, SQL Operations Studio, or SQLOps. I hoped it was going to be my new favorite toy with all those extensions. In the end, I'm fine with it. There is one problem and a couple of missing features, … Continue reading Review: SQL Operations Studio (Preview) for SQL Server
SQL Server 2016’s STRING_SPLIT
I found a pretty cool little function as I was perusing the SQL Server functions documentation the other day. (What, doesn't everyone do that?) I just read the name of this function and thought, well, no need to create that function with a loop any longer! Finally, SPLIT has come to SQL Server! What is … Continue reading SQL Server 2016’s STRING_SPLIT
SQL Server’s [N]VARCHAR(MAX) and How to Wield It
[N]VARCHAR(MAX) is a data type that was created to replace [N]TEXT. Depending on how many characters you store in this data type, it will react differently to its surroundings. It might be just what you needed or it might be your worst nightmare, so choose wisely. Here's a run down on this data type. What … Continue reading SQL Server’s [N]VARCHAR(MAX) and How to Wield It
SQL Server’s CROSS APPLY and how to use it
CROSS APPLY is a beautiful alternative for your FROM clause. It isn't JOINed to anything but it can be correlated to other fields in your query. It also allows for an aggregate to be run on a row-by-row basis. CROSS APPLY can be very useful, and the following will show you what it is and … Continue reading SQL Server’s CROSS APPLY and how to use it
SSIS: Show Values of Variables in Progress or Execution Results
Here's a simple way to show the values of variables in an SSIS package. This will allow you an easy way to view whatever variables or parameters you want to see in the progress or execution results of a package. It will also be visible in the Execution Report in the Integration Services Catalogs. This … Continue reading SSIS: Show Values of Variables in Progress or Execution Results
Dynamic SQL – Two Ways to Make a SQL String and Run It
Dynamic SQL is just like it sounds: creating a SQL statement dynamically. A normal SQL Statement is just the string you are going to run. SELECT FIELD1, FIELD2, FIELD3 FROM TABLE1; But should you have a good business reason to do so, maybe you want to dynamically create the queries. (Personally, Dynamic SQL is the last … Continue reading Dynamic SQL – Two Ways to Make a SQL String and Run It
Creating an SSIS Package to Export a File
This is an easy run through tutorial of how to create a SQL Server Integration Services (SSIS) package to export a file.We are going to connect the database and use a query to populate a file. The file will be a standard CSV file.
Create an SSIS Package to Import a File
This is an easy run through tutorial of how to create a SQL Server Integration Services (SSIS) package to import a file. This is the most basic task there can be for a product named "SQL Server Integration Services." We are going to connect the database to a file so the data from the file … Continue reading Create an SSIS Package to Import a File
SSIS: Change Encryption on a Project and Packages
When creating packages, the default security protection level is set as EncryptSensitiveWithUserKey. The user key mentioned is created off of the login of the user who created the project. If a developer other than the one who originally created the project or package opens it, they will receive the following warnings: Warning loading project_name.dtproj: Warning: … Continue reading SSIS: Change Encryption on a Project and Packages