skip to main
|
skip to sidebar
Pages
Home
About Me
Technical Dreams...
Ads 468x60px
Social Icons
Thursday, 27 October 2011
Age Calculation
Hi,
In most of the project we need to calculate the age.
Consider below TSQL to calculate age, it should be used where age needs to be displayed.
SELECT
CAST
((
DATEDIFF
(
dd
,
<date_of_birth>
,
GETDATE
())/
365.25
)
AS
INT
)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Social Icons
Powered by
Blogger
.
Popular Posts
Allow only numeric character in JavaScript
Hi, Here is the example code of Javascript which allows you to type only numeric value in a textbox. Here is the features of this code...
Ranking Function
We have four types of ranking function in sql server 1.) row_number 2.) rank 3.) dense_rank Row_Number() Function The ROW_NUMBER(...
Find Duplicate Entry
In this way we can find duplicate entry in the database -- create table for test data create table test_data ( id int, product char(1...
Retrieve the Image From the Database
If we want to retrive the image from the database then first we pick the image from the database and then convert it into the image : Here...
Sql directives order
When we are optimizing the SQL statements to improve the performance I thought this tip would help the figure out where to tweak their cod...
Manipulate Header and Footer values at each page
Generally in SSRS Header and Footer value is same for a report. Sometime we require to show different value in the footer or header on the ...
Chaning extension of a file
This is very usefull code for me. This code I was needed when my solution was migrated from VS2008 to VS2010. In VS2008 we are using the nam...
Insert Multiple records into a SQL-Server Database
To insert multiple records into a SQL Server database, we need to call the INSERT INTO query every time. Suppose if we want to insert 10 ...
Getting Hard Disk Serial No. in C#
Every hard disk has a unique serial number which we can get by our code here is a example which gives you the you computer's c drive se...
Creating Connection String Dynamically
For creating the connection string dynamically first you create a notepad file and save it at desktop with the extension .udl For Example:...
Followers
Archive
►
2015
(5)
►
September
(1)
►
August
(1)
►
April
(1)
►
March
(2)
►
2014
(18)
►
December
(1)
►
November
(1)
►
September
(2)
►
July
(2)
►
May
(5)
►
March
(1)
►
February
(3)
►
January
(3)
►
2013
(15)
►
December
(1)
►
November
(1)
►
October
(1)
►
June
(1)
►
May
(1)
►
March
(1)
►
February
(2)
►
January
(7)
►
2012
(40)
►
December
(6)
►
November
(2)
►
October
(8)
►
September
(4)
►
May
(6)
►
April
(5)
►
March
(5)
►
February
(3)
►
January
(1)
▼
2011
(27)
►
December
(4)
►
November
(15)
▼
October
(8)
Age Calculation
Calendar In Sql Server Reporting Services.
Split the comma separated value
Comma separated Value In SQL-Server
JQuery Date Function
Case Statement in INNER JOIN
SSRS Column header is not repeating???
Unique constraint to allow multiple NULL's in Sql ...
Search
No comments:
Post a Comment