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:
01226867
Views:
21
This message has been marked as the solution to the initial question of the thread.
>The RAISEERROR supports only integers for %d/%i. You'll have to convert your numeric value to a string and use with %s modificator.

:-) Thanks for confirm me what I was thinking!

So, I have 'updated' my function like this:
Declare @Var1 Integer, @Var2 numeric (9,2), @Var2s VarChar(10)
Set @Var1 = 1
Set @Var2 = 123.45
Set @Var2s = Ltrim(Str(@Var2,9,2))
RaisError('Var1 = %i Var2 = %-s',16,1,@Var1, @Var2s)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rodolfo Duarte
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform