How can we help you today? How can we help you today?

SQL CLR TVF ORDER BY hint is ignored

When scripting SQL CLR Table Valued Function with SSMS, ORDER BY hint is not shown.

-- Original Script ...
CREATE FUNCTION [dbo].[FunctionName]( @SomeArgument bit )
RETURNS TABLE (
Value1 int,
Ordinal int)
WITH EXECUTE AS CALLER
ORDER ( Ordinal ASC ) AS -- <-- this is the hint we're talking about !
EXTERNAL NAME [AssemblyName].[Class].[FunctionName]
-- ... becomes scripted as ...
CREATE FUNCTION [dbo].[FunctionName] (@SomeArgument bit )
RETURNS TABLE (
[Value1] [int],
[Ordinal] [int] NULL)
WITH EXECUTE AS CALLER
EXTERNAL NAME [AssemblyName].[Class].[FunctionName]
GO
bvukov
0

Comments

2 comments

  • David E
    Hi Bvukov,

    Sorry to hear that you're hitting an issue with Compare. It appears you've found a feature of CLR functions that is not currently understood by our comparison engine. I've logged a bug for us to look at getting this properly supported and resolved (SC-8034). I'll make a note to let you know on this thread when this issue is resolved.

    Regards,
    David
    David E
    0
  • bvukov
    FYI Microsoft SSMS CREATE script also fails to script it properly.
    bvukov
    0

Add comment

Please sign in to leave a comment.