Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2002
    Posts
    1

    Unanswered: some (most likely simple) DB2 problems

    When I create a stored procedure that is to just take in one input, and then return that input, I get errors on every data type except for integer. I know that RETURN only takes an integer, so is there some other way of doing it without using RETURN?

    Also, for a stored procedure which takes in an input and an input/output, adds them, and sets it into the input/output, none of the non-numeric data types work. When I tried using CONCAT (or || ) to put two character strings together, it would only set the first variable into the input/output. For example, when I did this:

    SET INPUTOUTPUT_CHAR = (INPUT_CHAR CONCAT INPUTOUTPUT_CHAR)

    and I put 'Hello' for INPUT_CHAR and 'World' for INPUTOUTPUT_CHAR, it would saw that INPUTOUT_CHAR's new value was only 'Hello'. When I tried ('Hello' CONCAT INPUTOUTPUT_CHAR), it said 'Hello World', but once I put ('Hello' CONCAT INPUTOUTPUT_CHAR CONCAT INPUT_CHAR) it would not read in the last variable.
    I also had similar problems with date, time, blob, clob, dbclob, graphic, and vargraphic.

    The last problem lies in a stored procedure where I have to create a table with all possible data types and select all the rows from it. First of all, I thought that DB2 had a data type to support currency (I thought it was MONEY), because it is listed in some of the books that I have; however, when I put it in the table, it said that it is not a valid type. Also, with blob, clob, dbclob, graphic, and vargraphic, what kind of things do I put in the table? I tried numbers and letter, and both worked

    If anyone could help me out with these issues, I'd greatly appreciate it.

    Thank you in advance.

  2. #2
    Join Date
    Jul 2002
    Location
    India
    Posts
    11
    ther is no MONEY type in DB2 , I have seen the same only in Sybase.
    BLOB's store binary data so all hex chars are possible values & CLOBS store all characters upto 2GB , DBLOBS store Double byte chars for internationalisation ie unicode
    Will get back on the SP problemsa later
    Cheers
    Saka
    :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •