Results 1 to 4 of 4

Thread: acess query

  1. #1
    Join Date
    Jan 2003
    Posts
    4

    Unanswered: acess query

    want a solution for this query.
    I have a table like this,it contains a fields like id,originalid,filename

    ID OriginalID FileName
    100 0 abc.doc
    101 100 a.doc
    102 101 b.doc
    103 102 c.doc
    104 103 d.doc

    suposse when i passed the id=104 the query should display above all records,because parent oigianlid is 103 for 104 and 102 for 102 and so on..

    i passing 104 as a parameter to this query

    so please send answer to this query

  2. #2
    Join Date
    Nov 2002
    Posts
    150

    Re: acess query

    Originally posted by b2bsatyam
    want a solution for this query.
    I have a table like this,it contains a fields like id,originalid,filename

    ID OriginalID FileName
    100 0 abc.doc
    101 100 a.doc
    102 101 b.doc
    103 102 c.doc
    104 103 d.doc

    suposse when i passed the id=104 the query should display above all records,because parent oigianlid is 103 for 104 and 102 for 102 and so on..

    i passing 104 as a parameter to this query

    so please send answer to this query
    Are you saying you want to see all the records if you pass in 104 because it's parent (103) has a parent (102) who has a parent (101), etc..?

  3. #3
    Join Date
    Jan 2003
    Posts
    4

    Re: acess query

    Originally posted by FirstAndGoal4
    Are you saying you want to see all the records if you pass in 104 because it's parent (103) has a parent (102) who has a parent (101), etc..?

    Not all records for 104 the parent originalid is 103 and for 103 is 102
    and for 102 is 101,101 is 100

    so the query should display the records only for 104 group
    104
    103
    102
    101
    100

    in this table there are many other group includes.
    i passing the top record id as a parameter(i.e 104) as a parameter.so the should display 104 batch records.

  4. #4
    Join Date
    Nov 2002
    Posts
    150

    Re: acess query

    Originally posted by b2bsatyam
    Not all records for 104 the parent originalid is 103 and for 103 is 102
    and for 102 is 101,101 is 100

    so the query should display the records only for 104 group
    104
    103
    102
    101
    100

    in this table there are many other group includes.
    i passing the top record id as a parameter(i.e 104) as a parameter.so the should display 104 batch records.
    I don't think you will be able to do this with a query. You will probably have to write some recursive functions and write the results out to a temp table.

Posting Permissions

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