Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2003
    Location
    Toronto, Ontario, Canada
    Posts
    34

    Question Unanswered: column with null values

    Hello

    Here is my situation: I have a query that is somewhat straightforward except for one clause. there are 2 columns (for arguments sake lets call these columns 'abc' and 'efg') which do not exist in any table in my database. The requester would still like to see this the columns in the query but the rows for the columns should contain null values.
    I tried using this approach:
    select column_1, 'abc', 'efg'
    from table_1

    The results were:
    column_1|'abc'|'efg'
    -------------------------
    value1 |'abc'|'efg'
    value2 |'abc'|'efg'
    value3 |'abc'|'efg'
    value4 |'abc'|'efg'

    If anyone can help me out that would be much appreciated

    Thanks

  2. #2
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Hi Hally,

    select
    column1,
    null as abc,
    null as efg,
    (8*10)+3 as xyz
    from ....

    HTH
    Bill

  3. #3
    Join Date
    Feb 2003
    Location
    Toronto, Ontario, Canada
    Posts
    34

    Cool

    I just tried your resolution and it works perfectly

    Thanks Bill



    Originally posted by billm
    Hi Hally,

    select
    column1,
    null as abc,
    null as efg,
    (8*10)+3 as xyz
    from ....

    HTH
    Bill

Posting Permissions

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