Sql Server Interview Questions and Answers

1) SQL Server query to split the Field into 2 Column. This query the developer can use when the name consists of numeric value like Ram1, Ram2

Note – First 3 Character will be in First Column and the Last One in another Column 2) SQL Server query to returns the index of First numeric in the column

Note – The SQL Server (Transact-SQL) PATINDEX functions returns the location of a pattern in a string. The search is not case-sensitive. 3) SQL server query to remove special characters from a string value. Here all characters except 0-9, a-z … Click here to continue…..

Top Sql Server Interview Questions and their Answers

1)  How to create an empty table emp1 with same structure as emp?

2)  How to find the Max Salary from each department?

3) Retreive year part from the table ..

Similarly for MONTH

4) Get the difference of month of DateTime.

    Similarly for Days

5) Get all Employee details whose Joining Year is 2016.

6) Select all the Employees whose JoiningDate is JAN(1).

7) Split Date, month, Year from DateTime Here is query You can achieve this task in two ways. a) DATEPART b) Year,Mont,Day Let’s see the Query: … Click here to continue…..

Difference between report builder and report designer

Report Builder is a web-based tool to create reports. Report Builder is assessable through the Report Manager so the reports developed are bydefault stored in the Server but reports developed using Report designer of BIDS available in MS Visual Studio can be stored as RDL Files in the local or can be stored in the server. There is no compulsion as such. Report Builder is basically used by the end-users for developing some basic reports with little features as compared to the large functionality of Report Designer in BIDS which is mainly used by developers. A report builder looks more … Click here to continue…..

Types of SSRS Reports

Parameterized reports: When the output of a report is not static but instead depends on the input parameters supplied to the reports at run time, the report is known as a Parameterized report.Drillthrough reports, linked reports, subreport and all other report types are a kind of Parameterized reports. Linked Report: A linked report is a report server item that is derived from an existing report and retains the original report’s definition. A linked report always inherits report layout and data source properties of the original report. All other properties and settings can be different from those of the original report, … Click here to continue…..

Tips to improve performance of Database Operations

1) Return Multiple Resultsets The database code if has request paths that go to the database more than once then, these round-trips decreases the number of requests per second your application can serve. Solution: Return multiple resultsets in a single database request, so that you can cut the total time spent communicating with the database. You’ll be making your system more scalable, too, as you’ll cut down on the work the database server is doing managing requests. 2) Connection Pooling and Object Pooling Connection pooling is a useful way to reuse connections for multiple requests, rather than paying the overhead … Click here to continue…..