Viewing 5 posts - 61 through 65 (of 65 total)
The reason you get Sandeep as a result is because DISTINCT is applied to "COALESCE( @x + ',', '') + name" first - which generates an internal virtual table. Then...
January 8, 2010 at 11:14 am
SELECT Name1, [Dev], [Prod], [Dev] - [Prod] as 'Diff'
FROM
(
SELECT xType, Name1, Qty
FRoM #Temp
) as SrcTable
PIVOT(
SUM(Qty)
FOR xType IN ( [Dev], [Prod] ) ) as PvtTbl
December 8, 2009 at 12:51 pm
vk-kirov (12/4/2009)
stewartc-708166 (12/3/2009)
the explanation re why the rounding off takes place is.....?
Something about this can be found in BOL, topic "Precision, Scale, and Length (Transact-SQL)": http://technet.microsoft.com/en-us/library/ms190476.aspx
We have two numbers of...
December 4, 2009 at 11:05 am
colin.frame (12/4/2009)
This explains it:http://msdn.microsoft.com/en-us/library/aa258274(SQL.80).aspx
For division:
scale of the result = s1 + s2 + 1
where s1 and s2 are the scales of the initial numbers.
Nowhere...
December 4, 2009 at 7:10 am
If the length of the value of the P_Amount column is > 5, you will get this error because you are passing a negative number into the LEFT function.
SELECT Cast(Left('00000',...
November 16, 2009 at 12:22 pm
Viewing 5 posts - 61 through 65 (of 65 total)