Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Posts
    10

    Unanswered: Db2 Stored Procedure

    Hi

    I am new to the Db2 Stored procedure so would like to get some help on it

    I am writing an Outbound script to output data from my Db2 Contact table in a flat file. The Field Date value is stored as 2003-10-14 17:17:54.333 (date and Timestamp)

    I would like to get an output value of 031014 in my flat file.

    Can some one write an SQL Procedure for me...

    Any help would be appreciated

    Thanks

    Gautam S

  2. #2
    Join Date
    Nov 2003
    Location
    Netherlands
    Posts
    96

    Re: Db2 Stored Procedure

    Originally posted by gsinha
    Hi

    I am new to the Db2 Stored procedure so would like to get some help on it

    I am writing an Outbound script to output data from my Db2 Contact table in a flat file. The Field Date value is stored as 2003-10-14 17:17:54.333 (date and Timestamp)

    I would like to get an output value of 031014 in my flat file.

    Can some one write an SQL Procedure for me...

    Any help would be appreciated

    Thanks

    Gautam S

    You don't need a stored procedure,
    substr(datefield,3,2) concat substr(datefield,6,2) concat substr(datefield,9,2) will return the string you want.

    Hope this helps

  3. #3
    Join Date
    Oct 2003
    Posts
    10

    Smile

    Thanks a lot

Posting Permissions

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