Forum Replies Created

Viewing 12 posts - 16 through 28 (of 28 total)

  • RE: Exec SP and ignore the output (occasionally)

    Florian Reischl (9/7/2009)


    claudiosil100 (9/7/2009)


    Msg 6819, Level 16, State 5, Procedure spiappGetTrv, Line 22

    The FOR XML clause is not allowed in a INSERT statement.

    Oups... didn't ever try this with FOR XML...

  • RE: Exec SP and ignore the output (occasionally)

    Florian Reischl (9/7/2009)


    claudiosil100 (9/7/2009)


    would be the perfect way without any 3rd parameter to say if it is normal or is being called by another SP

    IF @SP2

    SELECT field1,...

  • RE: Exec SP and ignore the output (occasionally)

    Florian Reischl (9/7/2009)


    Hi Cláudio

    claudiosil100 (9/7/2009)


    How can I apply this example to my problem? :S

    My usp_TestXML return an XML, using FOR XML RAW that it's used by another users/applications I can't...

  • RE: Exec SP and ignore the output (occasionally)

    would be the perfect way without any 3rd parameter to say if it is normal or is being called by another SP

    IF @SP2

    SELECT field1, field2, field3

    ...

  • RE: Exec SP and ignore the output (occasionally)

    Florian Reischl (9/7/2009)


    Hi claudiosil100

    Try this:

    ---==============================================

    -- we test on tempdb

    USE tempdb;

    GO

    ---==============================================

    -- a procedure which returns XML

    IF (OBJECT_ID('usp_TestXML') IS NULL)

    EXECUTE ('CREATE PROCEDURE usp_TestXML AS SELECT 1');

    GO

    ALTER PROCEDURE usp_TestXML

    AS

    ...

  • RE: Exec SP and ignore the output (occasionally)

    kruti (9/7/2009)


    Hi Cláudio,

    Kindly provide some sample of your both SPs.

    Hi Kruti

    something like this

    CREATE PROC SP1

    @param1 DATETIME,

    @param2 INT

    AS

    SELECT field1,

    field2,

    field3,

    field4,

    field5

    FROM table1

    WHERE field1 = @param2

    FOR XML RAW

    GO

    CREATE PROC SP2

    AS

    DECLARE...

  • RE: Exec SP and ignore the output (occasionally)

    sudhanva (9/7/2009)


    Have a look at this url

    check the code below:

    ----------------------------------------

    create proc sp_test123

    as

    begin

    SET NOCOUNT ON;

    create table #temp ( testName varchar(50))

    insert into #temp values ( 'abc'); insert into #temp values ( 'abc1');

    insert...

  • RE: Exec SP and ignore the output (occasionally)

    sudhanva (9/7/2009)


    claudiosil100 (9/7/2009)

    I can't because the output of SP1 it's an XML

    In the 1st SP. Make the return type as varchar or something..

    refer below example

    --creating some temp table for reference

    create...

  • RE: Exec SP and ignore the output (occasionally)

    savee (9/7/2009)


    Have u used a XML variable in your 2ndSP to receive the output?

    I can't because the output of SP1 it's an XML

    Msg 257, Level 16, State 3, Procedure spiappGetTrv,...

  • RE: Exec SP and ignore the output (occasionally)

    savee (9/7/2009)


    Have u used a XML variable in your 2ndSP to receive the output?

    Like

    DECLARE @x XML

    SET @x = SP @param1, @param2

    ??

    Don't work the return only accept an INTEGER as...

  • RE: Create Credencial for windows login without set password

    Let me try to clarify my question

    I know that it's possible to create an credential without clear text script going under Security Folder. (Here the password is typed with *****)

    But...

  • RE: Create Credencial for windows login without set password

    RBarryYoung (8/25/2009)


    Which Windows login? The SQL Server's? The SQL Agents? Someone else's?

    The one that's logged in at the moment!

    Imagine that I have to create an Job including...

Viewing 12 posts - 16 through 28 (of 28 total)