Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Posts
    1,605

    Unanswered: How to set column name in 'values' command

    Hi,
    executing command from DB2CMD:
    Code:
    C:\temp>DB2 VALUES (CURRENT DATE)
    returns output:
    Code:
    1
    ----------
    12.09.2007
    How to specify name of column (alias) to return the following output:
    Code:
    MyDate
    ----------
    12.09.2007
    The command:
    DB2 VALUES (CURRENT DATE) AS MYDATE
    is not working? Any idea?

    Thanks,
    Grofaty

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Code:
    with t (mydate) as (values current date)
    select * from t
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

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