Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
adamh
Starting Member
2 Posts |
Posted - 2007-12-05 : 16:51:45
|
| I have 2 tables: Documentation and Bill.Documentation table has a PATIENT column, EMPLOYEE column and a DATE column.Bill table has a PATIENT column, EMPLOYEE column and a DATE column.The tables are 1-to-many.When an employee documents a service, it inserts the date of service into the Documentation table.Then the employee sends a charge to the Bill table for the service that was documented.I want to be able to check that the date billed matches the date documented.Any ideas?Thanks. |
|
|
dataguru1971
Master Smack Fu Yak Hacker
1464 Posts |
Posted - 2007-12-05 : 18:04:49
|
Sounds like there should be more columns in at least 1 of those tables, otherwise comparing the two can be problematic. I would there is some other identifier in one or both of those tables, since merely comparing the dates using patient/employee name with nothing else would not produce desired results since each table will have many non-unique dates with each patient/employee column of both tables. Poor planning on your part does not constitute an emergency on my part. |
 |
|
|
adamh
Starting Member
2 Posts |
Posted - 2007-12-06 : 09:12:56
|
| sorry, there is an ID column in both tables. Does this help? |
 |
|
|
dataguru1971
Master Smack Fu Yak Hacker
1464 Posts |
Posted - 2007-12-07 : 14:06:40
|
Is the ID consistent in both tables, i.e., the ID from Bill will match the documentation for the same transaction? Poor planning on your part does not constitute an emergency on my part. |
 |
|
|
|
|
|