|
Browse by Tags
All Tags » cast
-
select CAST(FLOOR(CAST(cast('2010-02-01' as datetime) AS FLOAT)) AS int) = 40208
40208 in Excel = 01/30/2010
-
Salut,
va rog imi poate spune cineva cum as putea prinde o eroare de conversie intoarsa de functia CAST intr-o functie fara sa folosesc TRY CATCH. Incerc sa fie compatibila si cu SQL Server 2000 si cu 2005. Lucrez pe un 2005.
Uitati ce am incercat :)
DECLARE @x AS VARCHAR(50)
....
SELECT @y = CAST(@x AS BIGINT)
IF @@ERROR ...
|
|
|