Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Querying Microsoft SQL Server

I am a technology enthusiast and software developer by profession. I am developing .Net/database based enterprise applications from past 3 years.

My skills includes C# ,ASP.NET,SQL Server 2008 and MVC . My areas of interests are database development and application software development using Microsoft Technologies.

Top ADO.Net Interview and General FAQs

 1.       What is ADO.Net?

ADO.Net is set of components (classes) that are used to access data based on disconnected dataset and XML.It is advancement of classical ADO that is (Active Data Objects).ADO was tightly coupled client server system which was connected architecture. Unlike ADO, ADO.NET was built with…

Read more

0 comments, 195 reads

Posted in Querying Microsoft SQL Server on 4 September 2014

Iterating JSON data using Jquery



“JSON” (Javascript Object Notation) is Open standard to transmit data between endpoints. It is light weighted than XML, that’s why it is commonly used in web applications and distributed applications.Here I am describing an example to simply use JSON in your application and how to iterate JSON object if it…

Read more

0 comments, 495 reads

Posted in Querying Microsoft SQL Server on 3 July 2014

Top 50 .Net Framework Interview and General FAQs....


Q 1 What Is CLR? 

CLR is a runtime environment. Code that we develop with language compiler that targets the runtime is called managed code. Programmers write code in any .Net language, compile their programs into IL in a portable executable file that can then be managed and executed by…

Read more

0 comments, 406 reads

Posted in Querying Microsoft SQL Server on 16 April 2014

What is Program Database?

If you are working with .Net then you will be aware about PDB files.A PDB file is a Program Database,that is created during source code compilation.It stores information of program used by debugger like a list of all symbols in a module with their addresses and possibly the…

Read more

0 comments, 215 reads

Posted in Querying Microsoft SQL Server on 1 April 2014

Querying Linked Server without OPENQUERY

I already post an article how to setup Linked Server in SQL Server and querying on linked Server using open query. If you are not aware about this you can go through below link
Also you can create linked server object for SQL Server and…

Read more

0 comments, 7,897 reads

Posted in Querying Microsoft SQL Server on 14 February 2014

Wishing all visitors a very happy new year 2014




Wishing all visitors 

A Very Happy & Prosperous

 New Year 2014

 






Happy New Year! Thanks to visit queryinqsql.com.
Last year I started this Blog,and post  52 articles,scripts,basics of SQL Server that are based on SQL Server 2008.I hope  some of these articles were very helpful for you. In…

Read more

1 comments, 205 reads

Posted in Querying Microsoft SQL Server on 30 December 2013

Understanding SQL Server related Windows Registries

SQL Server related information from Windows registries


The Windows Registry is a hierarchical database that stores configuration settings and options on Microsoft Windows operating systems. It contains settings for low-level operating system components and for applications running on the platform that have opted to use…

Read more

0 comments, 549 reads

Posted in Querying Microsoft SQL Server on 30 November 2013

9 points before backing up SQL Server databases

Backing up SQL Server Databases


 Backing up your SQL Server database is essential for protecting your data. The word Backup refers to “Copies the data or log records from a SQL Server database or its transaction log to a backup device, such as a disk, to create a data…

Read more

3 comments, 935 reads

Posted in Querying Microsoft SQL Server on 23 November 2013

Querying Microsoft SQL Server: T-SQL

Querying Microsoft SQL Server: T-SQL: T -SQL is advancement of SQL. It  include    procedural  programming,  local variables , various support functions for string processing, d...

Read more

0 comments, 298 reads

Posted in Querying Microsoft SQL Server on 14 November 2013

Interview FAQ on Interface in C#

What is Interface?

 An interface is collection of methods, properties, indexers and events with only signatures. Means In interface Methods, properties, indexers and events do not have their definition. So an Interface allows you to define behavioral characteristics and apply those behaviours to Class that implements this Interface. Example

Read more

0 comments, 282 reads

Posted in Querying Microsoft SQL Server on 29 October 2013

SQL Server Inetrview FAQ 3

1.       How to find the maximum no of connection allowed in SQL Server?

 Select @@MAX_Connections

2.       How to select top 2 rows without using top?

 It can be achieved by using rowcount. For example
SET ROWCOUNT2
SELECT *fromtblName

3.       What is the purpose of…

Read more

1 comments, 456 reads

Posted in Querying Microsoft SQL Server on 24 October 2013

Cumulative SUM in SQL Server


Sometimes we need to find sum of first and next row in cumulative way.

Create table and insert data:

CREATE TABLE [dbo].[testsum](
      [name] [varchar](10) NULL,
      [val] [int] NULL,
      [ID] [int] NULL
) ON [PRIMARY]

insert into [testsum] (id,name,val)
values(1,'A',10),
(2,'B',20),
(3,'C',30)

Required Output:
ID    name  val   cumSum
1     A     10   …

Read more

8 comments, 8,654 reads

Posted in Querying Microsoft SQL Server on 19 October 2013

How to Split a string by delimited char in SQL Server..............

However I posted this one in one of my post.
Querying Microsoft SQL Server : Functions in SQL Server: Functions in SQL Server In SQL Server functions are subrotienes that encapsulate a group of T-SQL statements for reuse.SQL Server pro...

Here I separate ,Split function from that post.

CREATE…

Read more

13 comments, 130,116 reads

Posted in Querying Microsoft SQL Server on 19 September 2013

Connection Pool limit exceeds Error

Sometimes below error occurs on our web applications hosted on IIS connected with SQL Server.

Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.

Description: An unhandled exception…

Read more

1 comments, 10,091 reads

Posted in Querying Microsoft SQL Server on 13 September 2013

Insert data from Excel to SQL Server

Here I am discussing about data insertion from MS Excel into SQL Server table. SSMS provides  Export Import wizard by which you can achieve same easily. Follow below steps
Suppose I have a Excel file on server as c:/fis.xlsx.

1.       Go to database
2.       Right Click on…

Read more

5 comments, 4,110 reads

Posted in Querying Microsoft SQL Server on 11 September 2013

Sending Mail using SQL Server Express Edition

In SQL server standard and enterprise edition,A DataBase mail functionality in built to sent mail.But in SQL Server express edition,You need either use CLR integration or configure SQL Mail using MSDB system database.
Here I am discussing sending mail using MSDB system database.By default the MSDB database installed when…

Read more

3 comments, 7,327 reads

Posted in Querying Microsoft SQL Server on 2 September 2013

How to find SQL Server Version,Edition,Server Name?

How to find sql server version,edition,Server Name?



SQL Server provides a System Defined function SERVERPROPERTY(propertyname) .

By using this function you can find a number of things


Property Name
Description
syntax
Edition
Return SQL Server edition installed on machine.
select ServerProperty('edition')
EditionID
return Edition ID
select ServerProperty('editionid')
InstanceName

Read more

0 comments, 705 reads

Posted in Querying Microsoft SQL Server on 31 August 2013

When and why you should use 1=1 in WHERE clause?

One Interviewer ask this question during interview of my friend.It is easy to answer but need some specific and to the point answer.So I try to relate it with C#.
 If you don't know  the list of conditions at compile time and it will built at run time,…

Read more

0 comments, 214 reads

Posted in Querying Microsoft SQL Server on 24 August 2013

Remove duplicate records from a table in SQL server


Here I create a table and inserted some duplicate records for testing purpose.

create table temp(cust_id varchar(50))
insert into temp(cust_id)
values
('oms1'),
('oms2'),
('oms1'),
('oms2'),
('oms3')
select *from temp

Method 1:

Read more

0 comments, 297 reads

Posted in Querying Microsoft SQL Server on 19 March 2013

Querying Microsoft SQL Server : Basics of Triggers in SQL Server

Querying Microsoft SQL Server : Basics of Triggers in SQL Server: SQL Triggers:  A trigger is a procedural code like stored procedure that is automatically executed on certain actions (like insert, de...

Read more

0 comments, 202 reads

Posted in Querying Microsoft SQL Server on 13 March 2013

Older posts