Menu

print statement

Help
Samdisko
2010-11-30
2013-04-29
  • Samdisko

    Samdisko - 2010-11-30

    I am using with "Sybase".
    When I have in my procedure a "print" statement.
    How and where can I get the output ?
    I guess the normal place would have been in a Console view … but I see nothing.

     
  • Heiko Hilbert

    Heiko Hilbert - 2010-12-06

    The problem with the 'print' statement is. It as database specific and not available as separate information from JDBC. Nevertheless 'print' statements will be retrieved as SQL-Warnings from JDBC. So you have to enable 'Log SQL Info Messages (warnings)' in the SQL Explorer preferences.
    I have checked it with MsSql and jTds and unchecked all options in the SQLExplorer/Batch results preferences. I run the following statements using 'Execute SQL Batch':

    print 'test'
    select 1
    print 'test2'
    select 2
    

    and got

    test
    test2
                
    ----------- 
              1 
                
    ----------- 
              2
    

    As you can see the order of print and select statements is not corret in the result. But you will get the output. :-)

     
  • Samdisko

    Samdisko - 2010-12-06

    Well … it is already something …
    Less usefull than other dedicated tool for Sybase, but it helps …

    Thanks a lot.

     

Log in to post a comment.