SQL Server Interview Story
SQL Server Interview Story
language Programmer, System Lead then as BI Consultant I have a lot to bring to the table. Throughout
my career I have worked on Oracle and SQL queries including advanced PL/SQL. One of my project
included large data (over 250 Million) records per day. I first worked with PL/SQL to perform complex
transformation, quickly afterwards, I was introduced to SQL Server Integration Services (SSIS). I have
worked in the MSBI world for the last 5+ years and have truly experienced the power of SSIS, SSAS and
SSRS. I have taken a year off due to personal family reasons and I am eager to jump back in the MSBI
world. I possess excellent verbal/written communication skills along with clear judgment on what is
best for the future of the company.
Cheers,
Desmond.
I extract transfrorm and load data from many sources this case the business people a central plaace for
the data to do analysis and report it. I previously worked as a programmer and part of the project that
involved in extracting modem with Rogers. I was able to collect huge amount of data and place it in a
denomalized table that returned queries quickly to find a break in a cable that affected multiple
customers. Rogers Quality Assurance loved what I did and was able to quickly monitor and send Rogers
Truck to locations before the customers even realized the issue. I am looking or a company that has
risen a process of developing a data warehouse.
I possess good communications skills as well as technical skills are good so that I can provide better
services to your company about
Then tell about qualification and experience, about present job.
SELECT Custid,
Trans_date,
Row_Number() OVER(PARTITION BY Custid ORDER BY custid, Trans_date desc) Rowno
FROM Cust_Trans
)a
WHERE a. Rowno = 1;
What is ETL process? How many steps ETL contains? Explain with example.
- Define the source [ define the odbc connection to the database source ]
- Define the target [ create the odbc connection to the target database ]
- Create the mapping [ Apply business role here by adding transformations and define the data flow from source to target ]
Of course, each of these steps could have many sub-steps. Especially the Transform step.
- Full Load : While loading the data for the first time, all the set records are loaded at a stretch depending
on the volume. It erases all the contents of tables and reloads with fresh data
- Incremental Load : Applying the dynamic changes as and when necessary in a specific period. The
schedule is predefined each period
Power Center
- Processes large volumes of data
- ERP sources such as SAP,PeopleSoft,Oracle Apps. can be connected with power center
- Session partition is allowed to improve the performance of an ETL transaction
Power Mart
- Processes low volumes of data
- Does not provide connections to ERP sources
- Does not allow session partitions
TRICKY QUESTIONS
4.50 (5 votes)
Introduction
This tip presents few SQL Tricky Questions and Answers which will be useful for your development as
well as Interviews.
Answer
Hide Copy Code
INSERT INTO tbl_ID DEFAULT VALUES;
Hide Copy Code
ClientID ClientName
3 Sowrabh Malhotra
4 Saji Mon
6 Sajith Kumar
7 Vipin Job
8 Monoj Kumar
Answer
Method 1
Hide Copy Code
SELECT ClientName + ', '
From ClientMaster
For XML PATH('')
Method 2
Hide Copy Code
DECLARE @ClientNames VARCHAR(MAX);
SET @ClientNames = '';
But in the above example, the SQL server will not consider the [TOP 100 PERCENT] statement
when executing the query. So we will not get the result in the order described in the view. But if we
specify any number less than 100 PERCENT, SQL server will sort the result.
Note: It is not advisable to use ORDER BY in VIEWS. Use order by outside the view like the
following:
Hide Copy Code
Select ClientID, ClientName FROM vClientMaster Order BY ClientID DESC
Answer
Method 1
Only works on SQL Server 2008 and above
Using Filter Index. Filtered index is used to Index a portion of rows in a table. While creating an index,
we can specify conditional statements. The below SQL Query will create a Unique Index on the rows
having non nullvalues:
Hide Copy Code
CREATE UNIQUE INDEX IX_ClientMaster_ClientCode ON ClientMaster(ClientCode)
WHERE ClientCode IS NOT NULL
Method 2
Create a view having the unique fields and create a Unique Clustered Index on it:
Hide Copy Code
Create View vClientMaster_forIndex
With SchemaBinding
As
Select ClientCode From dbo.ClientMaster Where ClientCode IS NOT NULL;
Go
Method 3
Create a Computed Column like the following and create a UNIQUE KEY on that:
Hide Copy Code
[CMP_ClientCode] AS (case when [ClientCode] IS NULL _
then CONVERT([varchar](10),[ClientID],0) else [ClientCode] end)
Answer
The default size of user database is based on system database model. When a user creates a new
database, SQL server will take the copy of system model database and add user specified settings on
it and create new database.