This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C04FF2.69BEA730
Content-Type: text/plain;
charset="ISO-8859-1"
Thanks for clearing up my doubt.
Its worked.
Cheers,
Abhijit
-----Original Message-----
From: Toby Anscombe [mailto:tanscombe@m...]
Sent: Thursday, November 16, 2000 3:21 PM
To: sql language
Subject: [sql_language] Re: Stored Procedures in SQL Server
So - how many decimal places do you get in an integer or more to the point
who's version of integer are you using
Integer objects and expressions can be used with any mathematical
operations. Any fractions generated by these operations are truncated, not
rounded. For example, SELECT 5/3 returns a value of 1, not the value 2,
which would return if the fractional result was rounded.
so 3/2 = 1
-----Original Message-----
From: Abhijit [mailto:Abhijit@e...]
Sent: 16 November 2000 14:21
To: sql language
Subject: [sql_language] Re: Stored Procedures in SQL Server
Hi there,
Why do you need them to be declared as floats? Since I am doing a division,
I think it would be better to have them declared as
Integers. If you divide one integer by the other, do I not get a float?
3/2 = 1.5 doesn't it?
Regards,
Abhijit
-----Original Message-----
From: Harry Jega Nathan [mailto:hjeganathan@y...]
Sent: Wednesday, November 15, 2000 2:41 PM
To: sql language
Subject: [sql_language] Re: Stored Procedures in SQL Server
since @cndCount, @comCount are integers when you do an calculation return is
an integer, define
@cndCount as float and try.
Harry
Abhijit <abhijit@e...> wrote:
Here is my stored procedure. I need it to return a float. But it keeps on
returning integers.
CREATE PROCEDURE sp_PercCandidateSkills
@jobrefno int = ' ',
@cndid int = ' ',
@cndCount int output,
@comCount int output,
@Percentage float output
as
----(Select @cndCount / @comCount * 100)
Select @cndCount = (Select Count(*) From JZ_ComPersonalSkills Where
JobRefNo =@jobrefno)
Select @comCount = (Select Count(*) from JZ_CndPersonalSkills Where
CndPerSKILLID IN (Select ComPerSkillID from JZ_ComPersonalSkills Where
JobRefNo = @jobrefno)
And CndID = @cndID)
Set @percentage = (select @cndCount/ @comCount)
Could anyone tell me why?
Cheers,
Abhijit
---
--- Wrox Professional Web Developer Conference II
http://www.wroxconferences.com/WebDevEurope November 29th - December 1st
2000, Amsterdam, Netherlands Create powerful distributed web applications
serving you now and in the future. From ASP+ and VB.NET to XML and SQL
Server 2000 ---
abhijit@e...
$subst('Email.Unsub')
---
Wrox Professional Web Developer Conference II
http://www.wroxconferences.com/WebDevEurope
November 29th - December 1st 2000, Amsterdam, Netherlands
Create powerful distributed web applications serving you now and
in the future. From ASP+ and VB.NET to XML and SQL Server 2000
---
Wrox Professional Web Developer Conference II
http://www.wroxconferences.com/WebDevEurope
November 29th - December 1st 2000, Amsterdam, Netherlands
Create powerful distributed web applications serving you now and
in the future. From ASP+ and VB.NET to XML and SQL Server 2000