Output data in a Stored Procedure
am 15.06.2006 15:16:34 von Melissa Dougherty
------=_NextPart_000_003B_01C6905C.65C09A30
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I'm wanting to use a PRINT statement to output variables in my stored =
procedure.... Like in MS SQL Server. How can I do this in MySQL? I =
just want to verify my processing.
Thanks,
Melissa
------=_NextPart_000_003B_01C6905C.65C09A30--
Re: Output data in a Stored Procedure
am 16.06.2006 07:59:06 von Stephen Cook
I asked this same question here not too long ago, and apparently there
is no equivalent command. So, I wrote a stored procedure that takes a
VARCHAR parameter and puts it in a log table with a timestamp, and
afterwards I can check out that table to see if everything went as planned.
Someone suggested just using a SELECT but it seemed kind of messy to me
(cluttered up the output with headers and lines and all that just for
one short line of text).
If you do find a better solution I'd love to hear it.
Melissa Dougherty wrote:
> I'm wanting to use a PRINT statement to output variables in my stored procedure.... Like in MS SQL Server. How can I do this in MySQL? I just want to verify my processing.
>
> Thanks,
>
> Melissa
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: Output data in a Stored Procedure
am 16.06.2006 17:15:31 von Anders Karlsson
I can recommend my own little tool that does just this. It's a UDF that
allows you to send a UDP message to a special server that in turn sends
this to connected TCP clients. The UDF can be called from any procedure.
This is completely open source, and works on most platforms. The GUI
tool where the messages end up is a Windows tool, but runs OK under wine
on linux. The UDF and the UDP/TCP server has been compiled sucessfully
on Linux, Windows and Mac.
It's available for download on sourceforge at:
http://sourceforge.net/projects/myprocdbg
Docs are available on the project homepage. A new version of this tool
is being worked on, which will have some significant improvement, and
will include some new novel features.
Best regards
Anders Karlsson
Stephen Cook wrote:
> I asked this same question here not too long ago, and apparently there
> is no equivalent command. So, I wrote a stored procedure that takes a
> VARCHAR parameter and puts it in a log table with a timestamp, and
> afterwards I can check out that table to see if everything went as
> planned.
>
> Someone suggested just using a SELECT but it seemed kind of messy to
> me (cluttered up the output with headers and lines and all that just
> for one short line of text).
>
> If you do find a better solution I'd love to hear it.
>
>
>
> Melissa Dougherty wrote:
>> I'm wanting to use a PRINT statement to output variables in my stored
>> procedure.... Like in MS SQL Server. How can I do this in MySQL? I
>> just want to verify my processing.
>>
>> Thanks,
>>
>> Melissa
>
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Anders Karlsson (anders@mysql.com)
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Sales Engineer
/_/ /_/\_, /___/\___\_\___/ Stockholm
<___/ www.mysql.com Cellphone: +46 708 608121
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org