DCSIMG
SQL - Itai Goldstein

Browse by Tags

All Tags » SQL (RSS)

Generating SQL Server DB scripts

This solution is probably known to a lot of you out there, but for the ones who don’t, here is the solution in a Step-By-Step tutorial: In SQL Server Management Studio right click on one of the databases on your Object Explorer, and choose Tasks->Generate Scripts…: Then you’ll be introduced with the SQL Server Scripts Wizard: Next, you need to choose the database you would like to generate scripts for, in this step you can choose whether to script all objects in your database, or you can set the...
Posted by itai | with no comments
תגים:,

T-SQL Split function

During one of the projects I worked on, I had to parse a text which was passed from the application in my T-SQL code. I found that T-SQL had no built-in string system function for this operation, which I find rather useful, especially in cases you need to perform some batch based operations (which helps accelerate your application performance by reducing round trips to the DB). So I came up with the following solution: CREATE FUNCTION [dbo].[Split] ( @RowData NVARCHAR( MAX ), @Delimeter NVARCHAR...