var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: SQL Syntax Help
Can anyone help me with the syntax here please??
I have a table called 'Counties' and a table called 'ImportData'
Both contain a field named 'County'
'ImportData' has hundreds of records with duplicate values and 'Counties' has one of each county and an ID (Autonumber).
I would like to create SQL to append any unmatched counties from 'ImportData' to 'Counties'
Here is what i have so far:
SELECT DISTINCTROW ImportArea.County FROM ImportArea LEFT JOIN Counties ON ImportArea.County = Counties.County GROUP BY ImportArea.County, Counties.County HAVING (((Counties.County) Is Null))
This shows me one of each county that is not in 'Counties' . I just need an INTO statement i think but have got confused where to place it
INSERT INTO Counties (County) SELECT ....
I get an 'aggregate function' error when i do this??