Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Raiserror and numeric parameters (real, float)
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01226806
Message ID:
01226845
Views:
17
Check here for formats

Looks like only integer and strings are supported.

>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.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform