tags:

views:

110

answers:

4

Is there a way to write a message to the console? I'd like to write some debug data if it's possible.

+6  A: 

Well, there's the PRINT command:

PRINT 'Hello, world!'

I'm not sure if that's what you're looking for, though

Matti Virkkunen
yup that's what I'm looking for.
Kevin
+1  A: 

you ment like: print?

like in

print 'hello world'

??

riffnl
+1  A: 

Higher overhead but you can log to the event logging system with xp_logevent.

Alex K.
A: 

For long-running operations, instead of PRINT, you might need to use the RAISERROR with NOWAIT option workaround, since the messages display is cached.

Cade Roux