Call this function in your SP.Pass the arguments and get the result.
We searched a lot in WWW but could not find a code in SQL to find ratio.
When we wrote this simple thing..We thought letz share it across.Sharing is Expansion.
--Author Srikanth & Subin
--Finding ratio in SQL
--Call this function in your SP and enjoy
create function FindRatio(@n1 int,@n2 int)
declare @counter int
declare @hcf int
declare @ratio varchar(30)
declare @max int
if((@n1=0) or (@n2=0))
if((@n1%@counter=0) and (@n2%@counter=0))
For most DBAs, normalization is an understood concept, a bread and butter bit of knowledge. However, it is not at all unusual to review a database design by a development group for an OLTP (OnLine Transaction Processing) environment and find that the schema chosen is anything but properly normalized. This article by Brian Kelley will give you the core knowledge to data model.