Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Location
    Singapore
    Posts
    15

    Unanswered: display blank for non-tally results

    Hi,

    select vessel_name, voyage_no
    from ois_ship
    where transaction_id='LD72';

    this will retrieve me the vessel names and voyage numbers that have transaction id 'LD72'. i want to also retrieve the results that are not from transaction id 'LD72' but i want them to be retrieved as a blank space. in other words, i want the row of results that are not LD72 to be in my results but as blanks. what command can i add to acheive this?

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    select
    case when transaction_id='LD72'
    then vessel_name else ' ' end as vesselname
    , case when transaction_id='LD72'
    then voyage_no else ' ' end as voyageno
    from ois_ship

    rudy
    http://r937.com/

Posting Permissions

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