Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Location
    Maryland
    Posts
    152

    Unanswered: Two record in one row?

    Is it possible to print two record in one row. For example. If i have a table like this:
    Table99

    item_no, Description, price
    1 test1 2.0
    2. test2 3.0
    3. test3 4.0
    4. test4 5.0

    Now is it possible with one sql query to get data in this format

    item_no, Description, price Item_no Description Price
    1 test1 2.0 2. test2 3.0
    3. test3 4.0 4. test4 5.0

    Any Help will be highly appreciated
    mr_roomi

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Look up "Crosstab" queries in books online. You will need to define a column that determines the order the data fields should appear in.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.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
  •