#### Topic: How to make "one" join if on the right it is a lot of coincidence without select?

Day kind!
Let's admit in the left label at me 3 values on which I  to it right. If in right more than one coincidence of value the total increases at lines on kol-in coincidence. Whether prompt it is possible how total to avoid more refined method, than:

``select t1.fld1, (select top 1 fld2 from t2 where t1.fld3=t2.fld3) zzz from t1``

I.e.  with one/any value in the second table....

#### Re: How to make "one" join if on the right it is a lot of coincidence without select?

It is possible same to write, using CROSS APPLY. It is more refined?

#### Re: How to make "one" join if on the right it is a lot of coincidence without select?

Can here so:

``select t1.fld1, first (t2.fld2) where t1.fld3=t2.fld3 group by t1.fld1 from t1, t2``

#### Re: How to make "one" join if on the right it is a lot of coincidence without select?

982183 wrote:

Can here so:

``select t1.fld1, first (t2.fld2) where t1.fld3=t2.fld3 group by t1.fld1 from t1, t2``

And  that is not known also by boys

#### Re: How to make "one" join if on the right it is a lot of coincidence without select?

TaPaK;
The first time I hear

#### Re: How to make "one" join if on the right it is a lot of coincidence without select?

iap wrote:

It is possible same to write, using CROSS APPLY. It is more refined?

Well basically too most) but obvious plus that probably is possible at once some columns from the right table to fasten...

#### Re: How to make "one" join if on the right it is a lot of coincidence without select?

982183 wrote:

Can here so:

``select t1.fld1, first (t2.fld2) where t1.fld3=t2.fld3 group by t1.fld1 from t1, t2``

Like as is more refined... Only I will not understand what for group by here?

#### Re: How to make "one" join if on the right it is a lot of coincidence without select?

[/quote] like as is more refined... [/quote]
Check up. I am not assured that understood yours I aim.
[/quote] only I will not understand what for group by here? [/quote]
It is not pleasant group by, make distinct.
And how differently to aggregate the data?

#### Re: How to make "one" join if on the right it is a lot of coincidence without select?

like as is more refined...

you criteria of "elegance" that

#### Re: How to make "one" join if on the right it is a lot of coincidence without select?

And it is better - the demanded end result

#### Re: How to make "one" join if on the right it is a lot of coincidence without select?

982183 wrote:

like as is more refined...

Check up. I am not assured that understood yours I aim.

only I will not understand what for group by here?

It is not pleasant group by, make distinct.
And how differently to aggregate the data?

Feerichno!
And what for FIRST () the such?