Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JOIN without ON

Status
Not open for further replies.

admoore

IS-IT--Management
May 17, 2002
224
US
My goal is to update only more recent records into a table from another 'import' table which gets updated daily...

There is considerable 'overlap' and I want to look at the MAX() value of a date in the table to be updated in order to select the records from the import table to be imported.

I came up with this:
Code:
SELECT * from ct_adp_load as new 
JOIN camp_ct_fsc as existing
WHERE new.deldate > MAX(existing.deldate)
But I get an illegal use of group function error...

What am I doing wrong?

TIA,

-A
 
is this what you were intending?
Code:
select a.* from a.ct_adp_load
where a.deldate > (select max(b.deldate) from camp_ct_fsc) b
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top