Welcome to Sign in | Help

Re: inline function

  •  04-03-2009, 1:53 PM

    Re: inline function

    este ok

    merge

    cauza ptr care nu mergea era faptul ca e OBLIGATORIU sa folosesc un alias ptr select-ul meu . iar eu nu foloseam...

    SELECT prefix, SUM(nr) AS total
    FROM (

    select rtrim(rtrim(prefix)+rtrim(tel)) as prefix, count(*) as nr from dbo.tabel where (conditie = 'ceva')
    and (prefix like '08%') and
    (year(created)=2000 )
    group by rtrim(rtrim(prefix)+rtrim(tel))
    having count(*)<=100

    ) t
    GROUP BY prefix
    ORDER BY prefix, total

     


    G.
View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems