DotNetcr.com
Si deseas hacer un intercambio de links con DotNetcr, escríbenos aquí
Recibe las actualizaciones vía RSS
Te invitamos a unirte en nuestras redes
   http://www.facebook.com/DotNetcr
   http://www.twitter.com/dotnetcr

Como funciona la función de MSSQL SIGN

Por royrojas | 8/20/2005 | Visitas 4,804 | Voto 4.00
En nuestros procedimientos en SQL generalmente tenemos que hacer calculos e identificar si una operación matemática nos da como resultado un número negativo, positivo o cero.
Categorías : SQL Server
SIGN retorna positivo (+1), cero (0) o negativo (-1) dependiendo de la operación matemática que llevamos a cabo.

SIGN(ExpresionNumerica)

Ejemplos:

SELECT SIGN(330-200)


Retorna

--------------------
1.0



SELECT SIGN(100-250)


Retorna

--------------------
-1.0



SELECT SIGN(1-1)


Retorna

--------------------
0.0



DECLARE @valor real
SET @valor = -1
WHILE @valor < 2
BEGIN
SELECT SIGN(@valor)
SET NOCOUNT ON
SELECT @valor = @valor + 1
SET NOCOUNT OFF
END
SET NOCOUNT OFF
GO


Retorna

--------------------
-1.0

(1 row(s) affected)


--------------------
0.0

(1 row(s) affected)


--------------------
1.0

(1 row(s) affected)
Area de Comentarios
Por Anónimo - Fecha: 2012/09/26 08:15 PM
That's rlealy thinking of the highest order
Por Anónimo - Fecha: 2012/09/28 02:26 AM
3r4QJx , [url=http://tcgnpwjtvqwe.com/]tcgnpwjtvqwe[/url], [link=http://wpblefizmvaz.com/]wpblefizmvaz[/link], http://hjdpbktslmyq.com/
Por Anónimo - Fecha: 2012/09/29 02:32 PM
wSbcGD , [url=http://cqtuplltobgd.com/]cqtuplltobgd[/url], [link=http://leowztjgvhxr.com/]leowztjgvhxr[/link], http://hccbgqvagrax.com/
Por Anónimo - Fecha: 2015/12/17 02:24 PM
?/? dimitris ??e?:oxi re sy kaeblaats pws to ennow to prosopo. alla kyriws bgainei karta me thn fwnh k thn to spiti kathoti fainetai arketa k yparxei k kapoio antikeimeno sto video poy prodidei thn taytothta ths kanonikotata ( na mhn epektathw ) pantws se eyxaristw gia thn grhgorh antidrash (ton swsame ton theio apo kana egkefaliko ) k xairomai poy isxyei to moto oti apla me ena report sebesai k den xreiazetai tipote allo! always a fan!
Por Anónimo - Fecha: 2015/12/19 02:47 AM
I would comparable to thnkx for the efrofts you have situate in prose this weblog. I am hoping the matching high-grade website send starting you in the imminent as nicely. In reality your creative prose abilities has optimistic me to get my peculiar website now. Truly the blogging is spreading its wings quickly. Your engrave positive is a abundant example of it. http://mwtzupajf.com [url=http://dtocozbibzj.com]dtocozbibzj[/url] [link=http://jgbytycs.com]jgbytycs[/link]
Por Anónimo - Fecha: 2015/12/20 02:21 PM
( 2012.02.16 09:22 ) : I precisely ndeeed to appreciate you again. I do not know the things that I would have undertaken in the absence of the entire tactics revealed by you about this area. It absolutely was a real intimidating matter for me personally, nevertheless observing your professional approach you dealt with it made me to cry over fulfillment. Now i'm happier for your information and then hope you comprehend what a powerful job you were doing educating the others thru your web blog. I know that you haven't got to know all of us.Krosterantori http://koazmc.com [url=http://okdnbwe.com]okdnbwe[/url] [link=http://cczpbsdx.com]cczpbsdx[/link]
Ingrese su Comentario
Comentario
Para poder votar debe estar registrado en DotNetcr.com
Solo queda registrado el primer voto enviado
Voto


Últimos Recursos
ricardo leppe t
pedrojavier
CALIN
willipinru
richard
ragomez
PER 238
MEX 236
CRI 188
COL 118
ESP 105
ARG 88