Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
In script, PRINT now shows all in batch
Message
 
 
To
05/03/2008 14:13:53
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01299026
Message ID:
01299049
Views:
21
>>Yes, that's the way PRINT is handled. Try to replace PRINTs with
>>
>>RAISERROR( '.......' , 0, 1 ) WITH NOWAIT
>>
>
>Thanks, this works.
>
>But, the problem with that is that the + sign is not supported at that level to concatenate a portion of the date, for example.

You need to really check RAISEERROR syntax in BOL. + is not supported, you're right. I remember I had the same problem about 5+ years ago before.
DECLARE @DBNAME NVARCHAR(128);
SET @DBNAME = DB_NAME();

RAISERROR
    (N'The current database ID is:%d, the database name is: %s.',
    10, -- Severity.
    1, -- State.
    @DBID, -- First substitution argument.
    @DBNAME); -- Second substitution argument.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform