0 Replies Latest reply: Oct 5, 2017 10:09 AM by Marcos Azevedo RSS

    Link by dates

    Marcos Azevedo

      Hi all,

       

      I hope the community experts can help me on this.

       

      I Have the follow situation:

       

      Table SatO2

      Patient ID     Date                    SatO2

      1234           05/10 10:00:00          98

      1234           05/10 10:00:30          98

      1234           05/10 10:01:00          97

      ......

      1234           05/10 11:00:00          99

       

      Table FiO2

      Patient ID     Date               FiO2

      1234           05/10 09:30:00     21

      1234           05/10 10:15:00     25

       

      I need to join the tables based on the date so that the FiO2 value will value between to date/time without changing the number of registers of SatO2 table. This way:

       

      Patient ID     Date                    SatO2   FiO2

      1234           05/10 10:00:00          98      21

      1234           05/10 10:00:30          98      21

      1234           05/10 10:01:00          97      21

      ......

      1234           05/10 11:00:00          99      25

       

      I am stucked to join the two tables without a complete FK

      I would really apreciate your help.

      An working example would be great ! !

       

      Regards,

      Itamar