Hamden

Hamden
: Hamden
:  
: London
: 14 May 2012 02:36 PM
: 13 February 2015 21:39
:
Process manager with a reputed organization, Fond of learning new features and technology related to C#, ASP.Net, SQL Server, MVC etc.I like to help others, if I can
29 Articles

update multiple table with transaction between try catch in sql server

I need to create script for entire database changes every week for my client to run on production server, when I was creating the script I need to check whatever I have created so I try to use transaction and to roll back every change, so I used try catch but it inserted many records in some master tables while there was some error in script and still error was not catching by try catch where i...   On 11 Oct 2013  Viewed: 1,172

SQL COUNT Function with example

Count function takes one parameter and returns the number of rows for the matching criteria. Select Count(*) From employees It will return count of entire records into Employees table, same result can also be get from following sql statement Select Count(1) From employees In this statement we used, 1 in place of *, there are discussion about count(*) and count(1),...   On 31 Aug 2013  Viewed: 973

Watemark to disappear only when user start input in field

Watermark with ajax disappears when field gets focus, which is quite difficult to understand what should I enter in this field if I have not noticed before moving to that field. It's nice to show the water mark until user start entering something into field. If you have ever used Facebook they are using the same functionality, so let's see how can we do it for our applications. Easiest way...   On 13 Jan 2013  Viewed: 828

Search a column name into all the table across databases in sql server

How to search a column name in any table (entire database) or how to check a column exists in any table or not, how to check a column belongs to which table, these are very common question we can get on different websites. Some times we know the column name but don't know the column name then we need a script to get the table name to proceed. Suppose we have table with primary key and want to...   On 09 May 2013  Viewed: 810

JavaScript Array: Create, Aceess and Methods

ArrayList and JavaScript, How to declare and store an ArrayList inside JavaScript, create an array in javascript, add item to javascript array, delete an item in an array in javascript, find an item in an array in javascript, these are the very basic question which most of the new developer searching for so I decided to write an articled to understand what is array in javascript and how it can...   On 30 Dec 2012  Viewed: 729

Get only date or time from a datetime column in sql server

In Sql Server we use DateTime column but in many cases we need to get either only date or only time. So we will see different ways to get these values according to our requirements. If you are using SQL Server 2008 or newer version then luckily we have two types Date and Time Let’s see this in action with Sql Server 2008 (it will not work in older version of SQL) SELECT Getdate()...   On 07 Sep 2013  Viewed: 657

Use JavaScript to hide and show text and graphics

You can show and hide the content to get attention of the user on a web page. it's a very useful thing for web designer and web developers. You can use JavaScript and CSS to achieve it. I am going to show some examples of it. There are many libraries available on internet having the feature to hide and show different section of page but usually they carry heavy files to download which may slow...   On 30 Dec 2012  Viewed: 621

How to get number of days in a month in SQL Server?

Sometimes we need to get the total number of days in month for given date, there is no build in function which can help us to directly use and get our result, so we need to write a small SQL statement to get the total number of days for a particular date. I found on some blog sites to use this but it will not work for every date DECLARE @date DATETIME SET @date = '05/17/2020' ...   On 14 May 2013  Viewed: 487

New conversion functions in sql server 2012

SQL Server introduced three new conversion functions to convert an expression to another data type, in this post we will see those functions and their usage **Conversion Functions** - PARSE - TRY_PARSE - TRY_CONVERT **PARSE:** This function parse the value and return then result, relies on CLR. It will take some performance overhead. Syntax PARSE (string_value AS data_type [...   On 15 May 2013  Viewed: 358
12