2005: creating aggregate function from .NET assembly

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • R.A.M.

    2005: creating aggregate function from .NET assembly

    Hello,
    I am learning SQL Server 2005. I have (correctly) written in .NET
    assembly DemoSQLServer with aggregate function AvgNoMinMax in class
    Demo and I have added assembly to database DemoSQLServer. Now I need
    to create aggregate in SQL Server. I tried this way:

    CREATE AGGREGATE AvgNoMinMax(@v float) RETURNS float EXTERNAL NAME
    [DemoSQLServer].[DemoSQLServer.D emo].[AvgNoMinMax]

    Unfortunately I have error:

    Incorrect syntax near '.'.

    I don't know what's wrong. Please help.
    Thank you very much!
    /RAM/
  • Erland Sommarskog

    #2
    Re: 2005: creating aggregate function from .NET assembly

    R.A.M. (r_ahimsa_m@poc zta.onet.pl) writes:
    I am learning SQL Server 2005. I have (correctly) written in .NET
    assembly DemoSQLServer with aggregate function AvgNoMinMax in class
    Demo and I have added assembly to database DemoSQLServer. Now I need
    to create aggregate in SQL Server. I tried this way:
    >
    CREATE AGGREGATE AvgNoMinMax(@v float) RETURNS float EXTERNAL NAME
    [DemoSQLServer].[DemoSQLServer.D emo].[AvgNoMinMax]
    >
    Unfortunately I have error:
    >
    Incorrect syntax near '.'.
    The thing to do when you get a syntax error is to look up the topic
    for the command in question and study the syntax graph in detail to
    find out what's wrong.

    Yes, I'm telling you to read the manual. You see, you are learning SQL 2005,
    and part of that is to learn the tremendous asset that Books Online actually
    is. Besides, by doing mistakes and finding what mistake - that is how you
    really learn things. You don't learn things by being spoon-fed in
    newsgroups.

    (That is not to say that asking in newsgroups is a bad idea. Sometimes
    it's rather creativity you need help with, and that is not be found in
    Books Online.)


    --
    Erland Sommarskog, SQL Server MVP, esquel@sommarsk og.se

    Books Online for SQL Server 2005 at

    Books Online for SQL Server 2000 at

    Comment

    Working...