-
The basic testing results of TSQL Challenge 79 - Finding the Islands is published and you can find it here .
-
In this series at Part 1 Removing unwanted characters , I posted a method that used a function. In part 2 I posted a method that used Dynamic SQL. Here is another improved method that uses Dynamic SQL --Create test data create table #data (data varchar(100)) insert #data select 'tes^@&t %stri...
-
Run the following code declare @t table(i int unique) insert into @t select 1 union all select null union all select null You will get the following error Msg 2627, Level 14, State 1, Line 3 Violation of UNIQUE KEY constraint 'UQ__#A989971__3BD019979D26A3BB'. Cannot insert duplicate key in object...
-
We are about to start the logic testing of TSQL Challenge 78 - Parse single field into multiple fields . We have created a sandbox for the tricky testing and you can find it here .
-
The basic testing results of TSQL Challenge 77 - Transforming monthly resource efforts into weekly actuals is published and you can find it here .
-
Did you know that table variables are stored in the tempdb database for execution scope only?. Ok. Let us run this code declare @t table(i int) select * from tempdb.INFORMATION_SCHEMA.TABLES The result is TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ----------------------------------------------...
-
The basic testing results of TSQL Challenge 78 - Parse single field into multiple fields is published and you can find it here .
-
Just published a sandbox for the basic testing of TSQL Challenge 78 - Parse single field into multiple fields . http://beyondrelational.com/puzzles/tsql/challenges/78/basic-testing-sandbox.aspx
-
As you know I have started a new series on "Exploring SSMS" by which I will be posting some features that are available in SSMS which will be very helping during the development. In this post we will see how to open query window at default when opening SSMS. When you start SSMS, by default...
-
Often peple ask this question in the forum. "I created a procedure with proper alignment. But when I wanted to alter the procedure, result of sp_helptext did not keep the original alignment. How do I keep the original format?" Well. One answer is to make use of Script Stored Procedure -->...
-
In this post Dynamic PIVOT in SQL Server 2005 , I have shown a way to dynamically generate the column values with names. I used to get mails frequently from people on how to pass parameters when executing the procedure. The following will find total sales made by each employee for each year(from Employees...
-
Few days before i have a requirement to find out the table name which are having a specific column with a specific value throughout the database. for that i build a query which takes <COLUMN NAME> and <VALUE> as parameter For example : A column <Col1> occurs in multiple tables in a...
-
Without running this query, can you guess the output? Query : select 999'''45' Output : Result 1 : Incorrect syntax near ' Result 2 : 999 Result 3 : 999'45 Result 4 : invalid column name 45
-
As you know I have started a new series on "Exploring SSMS" by which I will be posting some features that are available in SSMS which will be very helping during the development. In this post we will see how to insert code template for creating a table, stored procedure, login etc in the SQL...
-
As you know I have started a new series on "Exploring SSMS" by which I will be posting some features that are available in SSMS which will be very helping during the development. In this post we will see how to know to hide system databases from the SQL Server management studio. In the Tool...