Gustav Brock
gustav at cactus.dk
Fri Nov 12 04:54:14 CST 2004
Hi Mark That's right, though I only do that when absolutely needed. Look up in the archive for July 2002: SQL in-line subquery (solved) for the [<SQL Select>]. AS TableX syntax. /gustav > That is exactly what I ended up doing. But since I lack the SQL "guru" > certification ;) I thought I'd put the question out there. I was > thinking back to a thread a long while back regarding a method that > creates a sort of temporary table within one query...or something along > those lines. I didn't know if/how that method might apply to my > situation. > Mark > -----Original Message----- > From: Gustav Brock [mailto:gustav at cactus.dk] > Sent: Thursday, November 11, 2004 6:07 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Joining Two Tables > Hi Mark and Arthur > That may work but you'll be in trouble when trying to switch to design > view. I would create a query for Tbl2 with a field with the expression > needed to match the Tbl1.Fld1. Then use this query for Tbl1 whenever you > need to join Tbl1 and Tbl2. > /gustav >>>I have two tables I would like to join. Tbl1.Fld1 contains a >>>variable-length string, Tbl2.Fld2 contains the same variable-length >>>string concatenated with a variable-length suffix. >>> >>>Any suggestions on how to proceed? Is there an elegant solution? >>> >>>Mark >> At first blush I would try this: >> >> SELECT * FROM T1 INNER JOIN T2 ON T1.Field1 = Left(T.2.Field1, >> LEN(T1.Field1)) >> Arthur