How can we help you today? How can we help you today?
alex.weatherall
Hi Brian, No, its a bug in the way it reports the Quoted Identifier and ansi nulls options. f I create a table-valued function (note this is SQL Server 2000) with the QUOTED_IDENTIFIER and ANSI_NULLS options both set to ON e.g. SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE FUNCTION dbo.tfn_Test() RETURNS TABLE AS RETURN (SELECT 1 AS test) GO Then when Scripting this function out again (or using external tools to analyse it - SQL Compare for example), it is scripted as SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO CREATE FUNCTION dbo.tfn_Test() RETURNS TABLE AS RETURN (SELECT 1 AS test) GO It appears to run OK with the original settings, but obviously this script is incorrect. And if I run this script against my database : SELECT Name, Type, OBJECTPROPERTY(id, 'ExecIsQuotedIdentOn') IsQuotedIdentOn, OBJECTPROPERTY(id, 'ExecIsAnsiNullsOn') IsAnsiNullsOn FROM sysobjects WHERE type IN ('FN','IF','TF') Then I get NULLs back for the ObjectProperty statements when the type is TF. The other function types return 1 or 0 as expected. This also means that I can't edit this Table Functions in SQL Server Management Studio as it returns an error, because it can't get at these options. I've put this on the Microsoft SQL Server forum, but not got a reply yet. Thanks Alex Weatherall TeleWare.com / comments
Hi Brian, No, its a bug in the way it reports the Quoted Identifier and ansi nulls options. f I create a table-valued function (note this is SQL Server 2000) with the QUOTED_IDENTIFIER and ANSI_NUL...
0 votes