Re: How arrange this join ??

From: Van T. Dinh (VanThien.Dinh_at_discussions.microsoft.com)
Date: 03/26/05


Date: Sat, 26 Mar 2005 11:20:11 +1100

May be simpler to run 2 separate SQL Strings. One to update CLOSDATE and
COMPDATE which doesn't involve tblPriority (as far as I can see from your
SQL). The second one to update only PRITARG with data from tblPriority.

-- 
HTH
Van T. Dinh
MVP (Access)
"mscertified" <rupert@tigerlily.com> wrote in message
news:F00107A4-2782-4DF6-9E52-538E9E9874B3@microsoft.com...
> Thanks for the response, this should make it clearer:
>
>     strSQL = "UPDATE tblSSRData As D INNER JOIN tblPriority As P" & _
>              " ON D.[TASK_PRI_CD_1] = P.Code SET" & _
>              " D.CLOSDATE = ED(D.PRO_FROM,D.CLS_FROM)," & _
>              " D.COMPDATE = ED(D.PRO_FROM,D.CLS_FROM,D.CAN_FROM)," & _
>              " D.PRITARG = P.Target" & _
>              " WHERE REPORT_FROM_DATE = #" & DF & "#" & _
>              " AND REPORT_THRU_DATE = #" & DT & "#"
>
> ED is a function that returns the earliest of multiple dates. I need the
> first 2 set statements to run even if the tblPriority join fails since
only
> the 3rd SET statement depends on that join. I also have a second table I
need
> to join on and an additional (4th) set statement that will also be
> independent.
>