Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2012

    Unanswered: DB2 select statement - prefix and append output with text

    Hi all,

    I am running DB2 v9.7.0.5 as the backend database to TSM 6.3.
    I am working on a select statement – where I could use your assistance.

    select volume_name from volumes where DEVCLASS_NAME like 'LTO4' order by PCT_UTILIZED

    The output from the statement is:

    VOLUME_NAME: L00855L4

    VOLUME_NAME: L00899L4

    VOLUME_NAME: L00821L4

    I would like to modify the select statement to:
    1. Remove the “VOLUME_NAME:” from the output.
    2. Remove the blank lines from the output
    3. Prefix the data with a string (move data)
    4. Append output with a string (wait=yes)

    As an example I am looking for output that looks like:
    Move data L00855L4 wait=yes
    Move data L00899L4 wait=yes
    Move data L00821L4 wait=yes

  2. #2
    Join Date
    Oct 2009
    221B Baker St.
    Suggest you post this in the db2 part of the forum as you are using db2.

    Your situation may be due to TSM rather than db2/sql. When i run similar queries, the output is presented in column form - not with the "header" on each line of output.

Tags for this Thread

Posting Permissions

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