How to list

Discussion in 'ASP General' started by Paulo Roberto, Dec 14, 2007.

  1. Hi, I need the following results:

    NameOfExam1 NameOfExam2 NameOfExam3 ...
    NamePacient

    12/10/2007 01/01/2007 ...
    Paul 12/12/2007 01/03/2007 ...
    20/12/2007 01/03/2007 ...

    .... ...
    .... ...

    So I have some tables:

    PacientTable:
    Code -> AutoNumber
    Name -> char(50)

    ExamTable:
    Code -> AutoNumber
    NameOfExam -> Char(50)

    ScheduleExams:
    PacientCode -> Number PK
    ExamCode -> Number PK
    DateScheduled -> DateTime PK

    if I feed the tables with the example showed above, we'd have:

    PacientTable:
    1 Paul

    ExamTable:
    1 NameOfExam1

    ScheduleExams:
    1 1 12/10/2007
    1 1 12/12/2007
    1 1 20/12/2007

    I cannot think a logic to list the table above on <table>trs and tds

    Should it be done using more than 1 recordset? What you suggest? Can you
    help me ?

    Thanks a lot!
     
    Paulo Roberto, Dec 14, 2007
    #1
    1. Advertising

  2. "Paulo Roberto" <> wrote in message
    news:elX%...
    > Hi, I need the following results:
    >
    > NameOfExam1 NameOfExam2 NameOfExam3

    ....
    > NamePacient
    >
    > 12/10/2007 01/01/2007 ...
    > Paul 12/12/2007 01/03/2007 ...
    > 20/12/2007 01/03/2007 ...
    >
    > ... ...
    > ... ...
    >
    > So I have some tables:
    >
    > PacientTable:
    > Code -> AutoNumber
    > Name -> char(50)
    >
    > ExamTable:
    > Code -> AutoNumber
    > NameOfExam -> Char(50)
    >
    > ScheduleExams:
    > PacientCode -> Number PK
    > ExamCode -> Number PK
    > DateScheduled -> DateTime PK
    >
    > if I feed the tables with the example showed above, we'd have:
    >
    > PacientTable:
    > 1 Paul
    >
    > ExamTable:
    > 1 NameOfExam1
    >
    > ScheduleExams:
    > 1 1 12/10/2007
    > 1 1 12/12/2007
    > 1 1 20/12/2007
    >
    > I cannot think a logic to list the table above on <table>trs and tds
    >
    > Should it be done using more than 1 recordset? What you suggest? Can you
    > help me ?


    Look up the documentation on the keyword JOIN in for your database. Or
    Google
    SQL JOINS. Top reference to W3Schools would be a good place to start.

    --
    Anthony Jones - MVP ASP/ASP.NET
     
    Anthony Jones, Dec 14, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. roopa
    Replies:
    6
    Views:
    792
    Jerry Coffin
    Aug 27, 2004
  2. dackz
    Replies:
    0
    Views:
    504
    dackz
    Feb 6, 2007
  3. Debajit Adhikary
    Replies:
    17
    Views:
    720
    Debajit Adhikary
    Oct 18, 2007
  4. OW Ghim Siong
    Replies:
    2
    Views:
    424
    Peter Otten
    Nov 30, 2010
  5. asil klin
    Replies:
    28
    Views:
    1,328
    Andreas Leitgeb
    Mar 5, 2011
Loading...

Share This Page