Creating Trigger in SQL Server Table

SQL Trigger
Trigger is a action which will perform when the table gets insert, update or delete. We can choose the options on what the trigger should get invoked and create the syntax as below

CREATE Trigger triggername
ON tblname
FOR INSERT,UPDATE,DELETE -- We can add or remove the criteria here
AS
BEGIN

-- Action steps needs to carried out should be given here.

END

Creating Trigger in SQL Server Table was last modified: November 15th, 2017 by Justin Antony

What’s the difference between DELETE and TRUNCATE TABLE statement?

DELETE TRUNCATE TABLE difference sql server
DELETE TABLE : Delete is done on row by row basis and it logs the transaction which is slow.
TRUNCATE TABLE : Deletes all the rows at a time which makes it faster.
TRUNCATE TABLE can be rolled back.

What’s the difference between DELETE and TRUNCATE TABLE statement? was last modified: October 1st, 2017 by Justin Antony

In SSRS the size necessary to buffer the xml content exceeded the buffer quota ?

This error message will appear if you have deleted any existing component and forget to delete their reference from other data set or expression.

Solution:
Remove those reference and run again.

In SSRS the size necessary to buffer the xml content exceeded the buffer quota ? was last modified: February 15th, 2017 by Justin Antony

How to clear cache in SSRS Visual Studio. ?

clear cache SSRS

The following command will invoke the command prompt and delete the rdl.data files from the system which is basically the rdl cache.

Go to the menu Tools -> Select External Tools
Click Add
Give a Tile : Clear SSRS Data Cache
command : “%WinDir%\System32\cmd.exe”
Arguments : /C DEL /S /Q “$(SolutionDir)*.rdl.data”
Check the option “Use Output Window”

Regards
Author.

How to clear cache in SSRS Visual Studio. ? was last modified: October 1st, 2017 by Justin Antony

Remove duplicate Data using GroupBy

Remove duplicate data

 

DECLARE @tbl TABLE(
id INT IDENTITY(1, 1)
, col1 VARCHAR(20)
)
INSERT INTO @tbl VALUES ('Unique data')
INSERT INTO @tbl VALUES ('duplicate data')
INSERT INTO @tbl VALUES ('duplicate data')
select * From @tbl
DELETE
FROM @tbl
WHERE ID NOT IN
(
SELECT MAX(ID)
FROM @tbl
GROUP BY col1)
select * From @tbl
Remove duplicate Data using GroupBy was last modified: October 1st, 2017 by Justin Antony

SSIS Job information cache cleanup

SSIS Job cache cleanup

The SSIS Job information will be stored up in the following database

USE SSISDB
select * from [internal].[operations]

Delete these information periodically as a part of maintenance activity.

SSIS Job information cache cleanup was last modified: October 1st, 2017 by Justin Antony

Basic SQL commands

Basic SQL commands

SELECT – To extract data from the database
UPDATE – updates data in the database
DELETE – deletes data from the database
INSERT INTO – inserts new data into the database

CREATE DATABASE – creates a new database
ALTER DATABASE – modifies a database
CREATE TABLE – creates a new table
ALTER TABLE – modifies a table
DROP TABLE – deletes a table

CREATE INDEX – creates an index
DROP INDEX – deletes an index

Basic SQL commands was last modified: October 1st, 2017 by Justin Antony