Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2009
    Posts
    1

    Unanswered: how to write substing atmt in db2 udb

    Hi,

    I have a query which dispalys the o/p of script name,path,server info etc,..But i want to extract only script name from this. The problem here is if we write any substr stmt it will mnot give result properly ,becos he parameters that o/p is displaying will vary from query to query.....


    Thanks,
    Pavan
    db2-UDB dba

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Do you have any example of input and the desired output ???
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    May 2009
    Posts
    508
    Provided Answers: 1
    truepavan, without knowing your data or a sample (as sathyaram_s asked for), I can only guess.

    You may be able to use the LOCATE function to find the starting position of what you are looking for. Then you can use that as the second position of the SUBSTR function.

Posting Permissions

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