Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2003
    Posts
    3

    Unanswered: Query of more information than two tables holds

    Hi!

    I'm wonder how I can make an view that explains both whats in a table (after certain criteria) as well as what's not there:

    Table a contain all hours for a week
    Table b contaion information for some hours for the same week

    Hown can I make a sql sentence that give information about what's common (both in a and b) as well as information that is only in one of the tables (e.g. only in table a)

  2. #2
    Join Date
    May 2003
    Posts
    87
    Can you throw in some sample data to explain ?

    From what I could understand, UNION can be used with OUTER JOIN. But again, if you can explain it with data, will be able to tell the exact solution.

    Thanks !

  3. #3
    Join Date
    Jun 2003
    Posts
    3
    Table A will contain :
    every hour within a year e.g:
    2003.01.01 00:00:00
    2003.01.01 01:00:00
    2003.01.01 02:00:00
    etc...

    Table b will have certain information, but the common information is that date stamp.

    So what I want to produce is a view that will conatin something like
    the "hour stamp":
    View:
    "hour stamp", is_it_in_table_a, is_it_in_table_b, whats_the_table_b_s_value

Posting Permissions

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