Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Raiserror and numeric parameters (real, float)
Message
 
À
18/05/2007 12:05:10
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01226806
Message ID:
01226839
Vues:
25
Hi Borislav,

Thanks for your attention.

I can't just convert to integer, because I will lost decimals values. So, I just can't find any parameter to replace %i. Take a look a workaround:


Declare @Var1 Integer, @Var2 Numeric (9,3), @Var2i int, @Var2d int
Set @Var1 = 1
Set @Var2 = 123.45
Set @Var2i = Cast(@Var2 As integer)
Set @Var2d = (@Var2 - cast(@Var2 as integer) )*100
RaisError('Var1 = %i Var2 = %i,%i',16,1,@Var1, @Var2i, @Var2d)


But I think it is possible to use numerics as raiserror's parameters. I just don't know how! :-)

Thanks again.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rodolfo Duarte
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform