Viewing 15 posts - 196 through 210 (of 607 total)
Try casting before applying the average
SELECT
Week,
Hospital,
CAST( avg(Length_Of_Stay) AS DECIMAL(10,2)) as Average_LoS,
avg(CAST(Length_Of_Stay AS DECIMAL(10,2))) as Average_LoS_CAST
FROM table
GROUP BY
Week,
Hospital
October 22, 2013 at 3:25 am
Is this error on the subscriber?
October 21, 2013 at 8:04 am
It's simply a matter of executing the procedure inside your stored proc.
CREATE PROCEDURE MyNewProc
AS
EXEC AlreadyExistingProc;
GO
If you need to manipulate the data returned from a stored proc you can use a...
October 18, 2013 at 6:52 am
Both plans are doing a conversion and I don't think that converting twice is extra work for the CPU.
[Expr1004] = Scalar Operator(substring(CONVERT(varchar(30),[tempdb].[dbo].[#temp].[dec1],0),(1),len(CONVERT_IMPLICIT(varchar(41),[tempdb].[dbo].[#temp].[dec1],0))-(3)))
[Expr1004] = Scalar Operator(CONVERT(int,[tempdb].[dbo].[#temp].[dec1],0))
October 18, 2013 at 1:56 am
Your issue is wrapping the @images values with single quotes.
You need to initialize @images to a blank string
set @images = ''
and your else statement should not put a single...
October 18, 2013 at 1:31 am
TWH (10/16/2013)
How do you keep current with SQL Server?
User groups including volunteering to speak at the user group. SQLServerCentral, Blogs, Articles, Forums, Books, Newsletters, Twitter. I also enjoy technical chats...
October 18, 2013 at 12:58 am
I can only conclude that the correct value is 53% and not 52.8%.
October 16, 2013 at 8:21 am
That is 53%
How about:
SELECT SUM(CAST(columnname AS FLOAT))
October 16, 2013 at 8:17 am
These links might be of assistance
How to set up an SMTP relay in Office 365
How to configure SQL Database mail to send emails using Office 365 (Exchange Online): A walkthrough
October 16, 2013 at 8:15 am
What value does this give you?
SELECT CAST(SUM(columnname) AS FLOAT)
October 16, 2013 at 8:10 am
October 16, 2013 at 8:07 am
DECLARE @Number NUMERIC(5, 2) = 52.8
Seriously though, we would need to see your code. It sounds like a conversion issue but hard to tell.
October 16, 2013 at 7:56 am
Further to the request for DDL and an actual execution plan, can you also supply view definitions.
VW_FACT_NLTRANS
VW_DIM_EXPENSECODE
VW_DIM_SUPPLIER
VW_FACT_CURRENCY
October 16, 2013 at 6:22 am
Viewing 15 posts - 196 through 210 (of 607 total)