Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2009
    Posts
    3

    Unanswered: how to write a query for..

    I've compiled the question onto a image, just to explain it clearly and here are the links

    http://img507.imageshack.us/img507/3972/pleasehelp.jpg
    or
    http://i42.tinypic.com/34tdawh.jpg
    or
    http://img29.imageshack.us/img29/3972/pleasehelp.jpg


    please help me, I'm newbie for database.. any help will be appreciated..thanks in advance
    Last edited by shhash; 05-15-09 at 12:18.

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    What version of SQL Server?
    For 2005 and up, use a Common Table Expression (CTE).
    For earlier versions, there is an efficient technique using a temporary table.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Feb 2009
    Posts
    3
    I'm using sql 2000 developer edition.

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    You should upgrade to (at least) 2005, but until you do you can use this method: sqlblindman - Returning Child Records
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  5. #5
    Join Date
    Feb 2009
    Posts
    3
    yep, I installed .NET 2008 sp1 and sql sever 2008.

Posting Permissions

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