Have you heard of DISTINCT?
SELECT
DISTINCT a.UserID
b.DateIn
FROM
Table1 a
CROSS JOIN
Table2 b
Please, try a few things yourself before you come back to the list...
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "John Sek" <air_salak@h...>
Subject: [sql_language] Re: loop join
: using cross join, i'll get more than that. i'll get:
:
: 5210 01/12/02
: 5210 02/12/02
: 5210 03/12/02
: 5210 04/12/02
: 5210 05/12/02
: 5210 01/12/02
: 5210 02/12/02
: 5210 03/12/02
: 5210 04/12/02
: 5210 05/12/02
: 5210 01/12/02
: 5210 02/12/02
: 5210 03/12/02
: 5210 04/12/02
: 5210 05/12/02
:
: etc etc
:
: if i do have 10 "5210" in table1, then i'll have 10 "5210" multiple by the
: number of records in table2. This is somethinng not practical. this is
: because i already have at least 30 records in table2 and more than 400
: records in table1. so in total i'll ge more than 12000 records before i
: join it to another table. and it's almost imposible to join tables that
: has a lot of duplicates.
:
: Nevertheless, u gave some idea that will further help me. any other
: suggestion, please do let me know.