Results 1 to 2 of 2
  1. #1
    Join Date
    May 2006
    Posts
    1

    Unanswered: need help in select statement

    i wish to generate a sql which is not related to any table and can show the following result with two parameter 1997 and 2000:

    --------
    | year |
    --------
    | 1997 |
    | 1998 |
    | 1999 |
    | 2000 |
    --------

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Code:
    select 1997 as year
    union all
    select 1998
    union all
    select 1999
    union all
    select 2000
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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