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.

 All Forums
 Old Forums
 CLOSED - General SQL Server
 difficult multi table problem...

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-02-08 : 15:55:55
ken writes "I am trying to create a SQL select statement from three tables and dump it into one new table using DTS. the tables are Customer, Appliance, Inspect. For each appliance record there are several inspection records. When I create the new table for my website database I only want to have one record per appliance using the newest inspection record by date. I'm stumped...
The problem I'm having is using the newest inspection row for each appliance, if there are duplicates.
 help 
"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-02-08 : 15:57:45
This should do it:

http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=12691

Use the results of this SELECT statement to INSERT them into the new table.

Go to Top of Page
   

- Advertisement -