Hi,
Thanks. I had previously tried max in my select statement and would get this message:
Quote:
|
"You tried to execute a query that does not include the specified expression 'pin' as part of an aggregate function"
|
Had not thought to put it in an update statement, so I tried it, and now am getting:
Quote:
|
Syntax error (missing operator) in query expression 'max(date) fromtblAllVisitsThru2001'
|
actual code below:
Code:
update tbl2003NewVisits
set date = max(date)
from tblAllVisitsThru2001
where tblAllVisitsThru2001.provider = tbl2003NewVisits.provider;
Thought that maybe it was because of a reserved word conflict (date) so I changed it to an update statement
Code:
tbl2003NewVisits
set [date] = max([date])
from tblAllVisitsThru2001
where tblAllVisitsThru2001.provider = tbl2003NewVisits.provider;
I think my problem us that I have 150 records I am trying to find the WHERE providerID = providerID and can't seem to do a join since there are multiple rows for a provider in the main table that I am trying to pull from, because even without the clause regarding the date, trying to do a join on the table where I have one providerID (with the 150 rows) and the main table (900 rows) but when I take the join out I get 21000 plus rows (I do understand why this happens). Does that make sense?
Thanks in advance,
~Joyce