Viewing 3 posts - 1 through 3 (of 3 total)
I think that is because of your Decimal declaration. Try this one:-
DECLARE @Num4 AS DECIMAL(30,10)
SET @Num4 = 1567987.4699987
SELECT LEFT(CONVERT(VARCHAR(100),@Num4),CHARINDEX('.',CONVERT(VARCHAR(100),@Num4))+2)
I have changed @Num4 to DECIMAL(30,10) and is working fine.
🙂
May 20, 2009 at 5:55 am
DECLARE @Num4 AS DECIMAL(10,4)
SET @Num4 = 1234.982644
SELECT LEFT(CONVERT(VARCHAR(20),@Num4),CHARINDEX('.',CONVERT(VARCHAR(20),@Num4))+2)
May 20, 2009 at 5:37 am
Are you getting any error or something? I have tried the same code and it is working as expected. See the changed code:-
declare @i int
set @i=1
DECLARE @StartTime DATETIME
SET @StartTime =...
May 19, 2009 at 11:09 am
Viewing 3 posts - 1 through 3 (of 3 total)