Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • RE: assigning a number or step to a sequence that restarts within a result set

    select a.MicroTestID,a.TestDate,a.Item,a.ciptype

    ,case when a.ciptype like '%O%' THEN '0'

    Else

    row_number() over(partition by item,ciptype order by ciptype desc) END as sequence

    from

    (select MicroTestID,TestDate,Item,ciptype from #t) a

    ........:-P

  • RE: sql server

    create table #temp

    (compny varchar(10),

    location varchar(10),

    lotno varchar(10),

    amount int)

    insert into #temp

    select distinct a.* ,amount from storage a left outer join ACCOUNTS b

    ON a.compny= b.compny

    and a.location=b.location

    select compny,location,amount from #temp

    group...

Viewing 2 posts - 1 through 2 (of 2 total)