I have a table with 100 records. Now I want to generate INSERT statements with the same data. How will you generate?

Open SSMS — Right click on Database — Tasks — Generate scripts — Next — Select specific database objects — select your table — Next — Select the output type — Advanced — Select data only from Types of data to script

Read More

How to add 5 business days to all values of a date column?

First of all do not get confused between 5 days and 5 business days. There is a big difference between these two. 5 Business days means 5 working days(Not holidays). 5 days can be any day. It can be working day or

Read More

What are the different ways of transferring data from one database to another database?

There are several ways available to transfer the data from one database to another database. Few of them are listed below. SSIS BCP Import/Export Wizard INSERT…SELECT… SELECT…INTO… DTS 2000

Read More

How to display only Even numbered rows from a table?

————————————————————————– USE [ADVENTUREWORKS2012] GO ————————————————————————– — Fetching only Even numbered rows. ————————————————————————–

Read More

How to Swap Two column values of a table whose data types are same?

It is possible by writing a simple UPDATE statement ——————————————————————- USE [ADVENTUREWORKS2012] GO ——————————————————————- — Before Swapping ——————————————————————- SELECT TOP 5 [VacationHours], [SickLeaveHours] FROM [HumanResources].[Employee] ——————————————————————-

Read More

What are the basic steps involved in creating a Cube?

Steps to be followed: Create a data source Create a data source view with the required tables Create Dimensions Create a cube Deploy and Process the cube

Read More

Explain any 3 of CODD’s Rules

Edgar F. Codd, proposed thirteen rules (0 to 12) to define what is require d from a DBMS in order for it to be considered relational. Currently there is no commercial database management system which fully satisfies all the CODD’s rules. Rule No.

Read More