我有两个要查询客户和服务的表
客户表
cnum lastName Address Phone Comments
2 McKenzie Main Street 1234567898 None
3 Stevenson South Street 1225448844 None
4 Adams North Street 1234545454 None
服务
IncidentNum cnum serviceDate status category LastUpdated
x1 2 02-21-2013 Closed Repair 02-21-2013
c2 2 05-12-2013 Open Installation 05-13-2013
d2 3 05-01-2013 Closed Repair 05-05-2013
f2 4 05-12-2013 Open Repair 05-12-2013
基本上我想要做的是显示每个客户记录的最新更新记录,无论状态是关闭还是打开。
最后:
cnum lastName Address Phone Category Last Service
2 McKenzie Main Street 1234567898 Installation 05-13-2013
3 Stevenson South Street 1225448844 Repair 05-05-2013
4 Adams North Street 1234545454 Repair 05-12-2013
我使用 OLEDB,这是我在 VB 中的项目。任何输入将不胜感激。先感谢您!