What are the challenges you face when working across database platforms? Take the survey
Options

SQL CLR TVF ORDER BY hint is ignored

bvukovbvukov Posts: 3
edited September 8, 2015 11:23AM in SQL Compare 11
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

Comments

  • Options
    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
    Software Engineer
    Redgate Software
  • Options
    FYI Microsoft SSMS CREATE script also fails to script it properly.
Sign In or Register to comment.