[AccessD] SQL Problem

Steve Erbach erbachs at gmail.com
Wed Mar 4 08:06:45 CST 2009


Ervin,

That's one o' those classic tricky problems in SQL.  It has been made
less tricky in SQL Server 2005 with the addition of the ROW_NUMBER()
function.  In Access it's a poser.

This page may help you, it may not:

http://support.microsoft.com/default.aspx?scid=KB;EN-US;q186133

Steve Erbach
Neenah, WI


On Wed, Mar 4, 2009 at 6:27 AM, viner <viner at eunet.yu> wrote:
> I have two tables tblA and tblB. I want to match the column from table tblA
> (Col_A, autonumber) with column in table tblB (Col_B, contains long
> integers, the numbers can repeat) in single SQL query to get records(the
> record in the query to contain):
> - the first number in Col_A with the first number in Col_B(may more
> identical records if the number in Col_B exists more than once)
> - the second number in Col_A with the second number in Col_B(may more
> identical records if the number in Col_B exists more than once)
> .
> ..
> .
> -  the last number in Col_A with the last number in Col_B(may more identical
> records if the number in Col_B exists more than once)
>
> The Col_A and the Col_B contain the same number of different values
>
> Many TIA,
>    Ervin




More information about the AccessD mailing list