select isnumeric('0007678,03') da 1 verdadero
select isnumeric('00011,00') da 0 falso!!!!
no entiendo la diferencia
gracias
--
Salu2
-----------------------------------------
Microsoft MVP SQL Server
Culminis Speaker
------------------------------------------
"etragu" <Nando> escribió en el mensaje
news:OhRUcmLj...@TK2MSFTNGP02.phx.gbl...
Un intrigado saludo,
Rubén Vigón
Microsoft MVP Visual Basic
http://vigon.mvps.org
--
Un saludo
Salvador Ramos
------------------------------------------------
www.sqlserverymicrosoft.net (información sobre SQL Server y .NET)
www.sqlserverymicrosoft.net/acerca_de_salvador_ramos.htm
[SQL Server MVP]
------------------------------------------------
"etragu" <Nando> escribió en el mensaje
news:OhRUcmLj...@TK2MSFTNGP02.phx.gbl...
select @@version
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
May 3 2005 23:18:38
Copyright (c) 1988-2003 Microsoft Corporation
Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
(1 filas afectadas)
"Salvador Ramos" <webmaster...@YEstoHelpdna.net> escribió en el
mensaje news:OAZdDzMj...@TK2MSFTNGP06.phx.gbl...
Rubén,
For unknown reasons, in SQL Server 2000, only certain numbers of digits were allowed before the leftmost comma of a string in order for it to be convertible
to [money]. Specifically, there had to be exactly 0, 1, 2, 3, or 7 digits before the leftmost comma
http://groups.google.com/group/microsoft.public.sqlserver.programming/msg/d18c80c6231b5a14
This restriction has apparently been removed in SQL Server 2005, and any number of digits is allowed before the comma so long as overflow doesn't occur. Nice of you to have noticed this!
It's worth pointing out that the comma is ignored in the conversion to money, and it is never treated as a "decimal point," despite regional conventions in much of the world
declare @t table (
n int
)
insert into @t values (0) insert into @t values (1)
insert into @t values (2) insert into @t values (3)
insert into @t values (4) insert into @t values (5)
insert into @t values (6) insert into @t values (7)
insert into @t values (8) insert into @t values (9)
insert into @t values (10) insert into @t values (11)
insert into @t values (12)
select
cast(quotename(T1.n)+','+quotename(T2.n) as varchar(14)) as [[left]],[right]]],
isnumeric(replicate('1',T1.n) + ',' + replicate('1',T2.n)) as [isnumeric], replicate('1',T1.n) + ',' + replicate('1',T2.n) as [string]
from
@t as T1
cross join @t as T2
where
T1.n + T2.n <= len('922337203685477')
_________________________________________
Un saludo!