Welcome to Sign in | Help

Only functions and extended stored procedures can be executed from within a function.

  •  09-06-2007, 9:22 AM

    Only functions and extended stored procedures can be executed from within a function.

    Am o functie multitabled in care fac un shreading la o variabila xml

    Aceasta este functia:

    ALTER FUNCTION [dbo].[boys]

    (

    -- Add the parameters for the function here

    @boys xml

    )

    RETURNs @tbl_boys table(FirstName varchar(20),Counter int,Year int,id int)as

    begin

    Declare @idoc integer

    exec sp_xml_preparedocument @idoc output,@boys

    insert into @tbl_boys select * from openxml(@idoc,'/boys/boy') with (FirstName varchar(20),Counter int,Year int,id int)

    exec sp_xml_removedocument @idoc

    return

    end

    AM executat aceste instructiuni separat ca un batch ruleaza ok intprc setul de date dorit de mine.

    Eu am nevoie insa de ele intr-o functie care sa intoarca acest set de date.

    Cand fac

    select * from boys(@xmlset) unde in xmlset am setul de date de tabularizat obtin eroarea din subject si nu-mi dau seama unde e buba

    Multumesc


    Secolul XXI ori va fi religios ori nu va fi deloc
View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems