Forum Replies Created

Viewing 15 posts - 5,221 through 5,235 (of 5,393 total)

  • RE: Recursive Function

    You're welcome.

    Glad I could help

    -- Gianluca Sartori

  • RE: Recursive Function

    Ok, I think this is it:

    ALTER FUNCTION [dbo].[GetFullBOM] ( @ProdNo nvarchar(15) )

    RETURNS @TempBOM TABLE

    (

    PARNT nvarchar(15),

    ...

    -- Gianluca Sartori

  • RE: Recursive Function

    Does this help?

    CREATE FUNCTION [dbo].[GetFullBOM] ( @ProdNo nvarchar(15) )

    RETURNS @TempBOM TABLE

    (

    PARNT nvarchar(15),

    CHILD nvarchar(15)

    ...

    -- Gianluca Sartori

  • RE: Recursive Function

    Put @@ROWCOUNT in a variable, beacause it is always recalculated upon last query.

    Hope this helps

    Gianluca

    -- Gianluca Sartori

  • RE: Crystal Report run through DTS

    In order to export Crystal Reports to PDF you have to write some code in an ActiveX script task. I must say that it's not so simple, since I had...

    -- Gianluca Sartori

  • RE: Linked Servers have no info, but still work

    If you look at the results returned from the query, the column "datasource" is the network name of the server. You can also see the provider in "providername".

    This is everything...

    -- Gianluca Sartori

  • RE: Linked Servers have no info, but still work

    What do you see here?

    select *

    from master.dbo.sysservers

    Do the linked servers appear?

    -- Gianluca Sartori

  • RE: how to retrive the second highest value from the table

    Try this:

    DECLARE @employees TABLE (

    empId int,

    name varchar(50)

    )

    DECLARE @salaries TABLE (

    empId int,

    salary money

    )

    INSERT INTO @employees VALUES (1, 'John')

    INSERT INTO @employees VALUES (2, 'Mary')

    INSERT INTO @employees VALUES (3,...

    -- Gianluca Sartori

  • RE: Running a loop across a list of database without changing to the database

    Try this:

    EXEC sp_msforeachdb 'Use ?; exec test.dbo.SPNAme ''?'' '

    It should work.

    -- Gianluca Sartori

  • RE: Insert... Exec... at LINKEDServer, Error

    Did you try a different syntax such as:

    INSERT INTO MyTable

    SELECT *

    FROM linkedserver.catalog.schema.table

    or:

    INSERT INTO MyTable

    SELECT *

    FROM OPENQUERY(linkedserver, 'SELECT * FROM catalog.schema.table')

    I don't think this is a distributed transaction issue, but...

    -- Gianluca Sartori

  • RE: Query Timeout

    And this is the post I was talking about:

    http://www.sqlservercentral.com/Forums/FindPost673544.aspx

    -- Gianluca Sartori

  • RE: Query Timeout

    This is the test code:

    declare @tmpTab TABLE (

    column1 int,

    column2 int

    )

    declare @param1 int

    declare @result int

    set @param1 = 3

    insert into @tmpTab VALUES(1,1)

    insert into @tmpTab VALUES(1,1)

    insert into @tmpTab VALUES(1,2)

    insert into @tmpTab VALUES(1,2)

    insert into...

    -- Gianluca Sartori

  • RE: Query Timeout

    I can't tell you exactly why the test for @param1 = 0 takes so long, maybe someone with stronger skills can help you digging into this. This is something I...

    -- Gianluca Sartori

  • RE: To have T-SQL and CmdExec execution in one job step

    You can do it in a script step, VBScript or JScript.

    Dim connStr

    Dim tmpConn

    Dim rs

    Dim SERVERNAME, Catalog, UserId, pwd

    Dim ws

    SERVERNAME =...

    -- Gianluca Sartori

  • RE: How to skip rows during insert

    J-F's solution will work if you want to insert into a different table and not into the table on which the trigger is created. I don't understand if you're falling...

    -- Gianluca Sartori

Viewing 15 posts - 5,221 through 5,235 (of 5,393 total)