Showing posts with label print. Show all posts
Showing posts with label print. Show all posts

Sunday, March 11, 2012

division in SQL results in 0

division in SQL results in 0 Posted on: 01/09/2006 09:20:13



declare @.x int, @.y int, @.f float
set @.x = 100
set @.y = 2000
set @.f = @.x / @.y
print @.x
print @.y
print @.f

in the above code @.f prints as 0 instead of 0.05
how would i correct that?

Try this:

declare @.x int, @.y int, @.f float
set @.x = 100
set @.y = 2000
set @.f = @.x / (@.y * 1.0)
print @.x
print @.y
print @.f

Sunday, February 19, 2012

Distributing Reports automatically

Can reports be set up to run and print automatically to specific printers on a nightly basis. What I'm trying to accomplish is, I have 6 users who need to see specific transaction reports for thier department each day. Of course I don't want them to see the other departments reports.. What options do I have....

Thank You!!

Jim - try this link from the forum. I plan to try it this week and it may accomplish what you need.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=568015&SiteID=1