Welcome to Sign in | Help

Re: inline function

  •  04-02-2009, 8:18 PM

    Re: inline function

    Păi atunci, încearcă:

    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

    Nu merge aşa?

    Răzvan

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