Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSsubst_filter_names

  No additional text.


Syntax

create procedure sys.sp_MSsubst_filter_names
(
    @owner sysname,
    @table sysname,
    @filter_clause nvarchar(4000) output
)
as
begin
    set nocount on
    declare @retcode int
            ,@rplc_string nvarchar( 513 )
            ,@srch_string nvarchar(500)
            ,@expansion int  -- BYTES data will be expanded/contracted by
            ,@subst_offset int -- CHARACTER OFFSET at which to perform string operations

    if @filter_clause is null or @table is null
    begin
        -- error, @filter_clause cannot be null
        return 1
    end

    select @rplc_string = case when (@owner is null) then N'' else QUOTENAME(@owner) + N'.' end
                + QUOTENAME(@table)
            ,@srch_string = N'<>'
            ,@subst_offset = 0
    select @expansion = datalength(@rplc_string) - datalength(@srch_string)

    -- Note!  procedure is case insensitive
    select @subst_offset = charindex( @srch_string, upper(@filter_clause), @subst_offset )
    while( @subst_offset <> 0 )
    begin
        if datalength( @filter_clause ) + @expansion > 8000
        begin
            -- buffer overflow, return error
            return 1
        end
        else
        begin
            select @filter_clause = stuff( @filter_clause, @subst_offset, datalength( @srch_string ) / 2, @rplc_string )
                    ,@subst_offset = @subst_offset + @expansion / 2
        end
        select @subst_offset = charindex( @srch_string, upper(@filter_clause), @subst_offset )
    end

    return 0
end

 
Last revision 2008RTM
See also

  sp_MSrepl_articlefilter (Procedure)
sp_MSscript_article_view (Procedure)
sp_MSscript_begintrig1 (Procedure)
sp_MSscript_compensating_insert (Procedure)
       



News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash