User Profile

Collapse

Profile Sidebar

Collapse
appletastic
appletastic
Last Activity: Nov 20 '08, 04:37 PM
Joined: Oct 3 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • appletastic
    started a topic Try ... Catch
    in DB2

    Try ... Catch

    Hi all,

    I had a question regarding error handling in DB2 SQL I seem to be having some issues.

    So far I have a procedure, but I need to add a try and catch block in there and withing the catch block I need to store the Error Message as a value into a table. I am having issues with the syntax

    So far it Looks like:

    Code:
    Create Procedure dummy
    Begin
    Try:
    {CODE}
    ...
    See more | Go to post

  • appletastic
    replied to Selecting from a Dynamic Table in SQL
    in DB2
    Thanks sakumar9,

    Makes sense to Concat first, but I'm not exactely sure on how to do that. Any ideas, would be very helpful.

    apple...
    See more | Go to post

    Leave a comment:


  • appletastic
    replied to Selecting from a Dynamic Table in SQL
    in DB2
    Alright for the above code I added semicolons to the end of each line and that seemd to have solved that problem but arose another, now I get

    SQL0104N An unexpected token "(" was found following "SELECT * FROM concat".
    Expected tokens may include: "WHERE". SQLSTATE=42601


    I guess the issue is concatenating the table name and value together.

    Any Ideas??
    ...
    See more | Go to post

    Leave a comment:


  • appletastic
    started a topic Selecting from a Dynamic Table in SQL
    in DB2

    Selecting from a Dynamic Table in SQL

    Hi all,

    I have created a procedure that selects from a table based on the value of another table concatenated with some text.

    So this code below should select all from the table FL_TIME_DIM(value)

    However I get an error that states
    DB21034E The command was processed as an SQL statement because it was not a
    valid Command Line Processor command. During SQL processing it returned:
    ...
    See more | Go to post
No activity results to display
Show More
Working...