Re: remove duplicate items

From: J.O. Aho <user_at_example.net>
Date: Thu, 14 Feb 2019 20:13:03 +0100
Message-ID: <gclstvFfdh8U1_at_mid.individual.net>


[Quoted] On 2/14/19 10:57 AM, Ammammata wrote:

Maybe a group by would be in place when you select into the temp table.

> select d.docnum, 'txt' Testo
> into #tmp
> from dln1 a
> inner join dln1 b On a.U_I_BaseEntry = b.docentry And a.U_I_BaseType = 15
> inner join rdr1 c On b.baseentry = c.docentry And b.BaseLine = c.linenum
> And b.BaseType = 17
> inner join ordr d On c.docentry = d.docentry
> where a.docentry = '87'
group by d.docnum

-- 

  //Aho
Received on Thu Feb 14 2019 - 20:13:03 CET

Original text of this message