Forum Replies Created

Viewing 15 posts - 3,616 through 3,630 (of 5,394 total)

  • RE: New Stored Procedure

    Glad to see you solved your issue.

    I don't have any docs about Profiler at hand. You could start it and read the help, or google it.

  • RE: New Stored Procedure

    You could also add some PRINT commands to the IF/ELSE branches to see the path it took.

    Maybe this is easier than setting up a trace...

  • RE: New Stored Procedure

    Well, it doesn't work as you expected, but it probably works the way you coded it.

    Since you only gave us the code and not an explanation of the expected behaviour,...

  • RE: help in my procedure

    Brandie Tarvin (12/16/2010)


    Gianluca Sartori (12/16/2010)


    CELKO (12/15/2010)


    3) Why are you wasting time with dynamic SQL?

    Actually, dynamic SQL is the most efficient way to handle optional parameters in stored procedures.

    Using COALESCE,...

  • RE: help in my procedure

    CELKO (12/15/2010)


    3) Why are you wasting time with dynamic SQL?

    Actually, dynamic SQL is the most efficient way to handle optional parameters in stored procedures.

    Using COALESCE, ISNULL, CASE and OR...

  • RE: help in my procedure

    WayneS (12/15/2010)


    Craig Farrell (12/15/2010)


    Actually, the WHERE 1=1 is a neat little trick to avoid doing extra if statements to determine if something starts the clause and needs an AND. ...

  • RE: Is SP and InlineSQL performace almost same in mordern version of database than Old Version ?

    Shubhajyoti Ghosh (12/14/2010)


    So do you mean SP and cached Inline Query (Parametarized SQL of ORM using sp_executesql) performance wise same?

    Yes, as far as cache-hits is concerned. The same exact code...

  • RE: Is SP and InlineSQL performace almost same in mordern version of database than Old Version ?

    What a question! Really hard to give a sensible answer.

    I think this one needs to broken into several points:

    1) Query parsing / compilation

    ORMs generate SQL code that has to be...

  • RE: Construct an EXECUTE string

    Mac_85 (12/13/2010)


    I must have missed a whole lot (having not used these before).

    ADO Command Objects can help you avoiding sql injection and, whenever the procedure is called multiple times, can...

  • RE: Construct an EXECUTE string

    I don't know exactly what is causing the error. It seems to be related to the parameter type.

    You could try to create the parameters reading from the stored procedure metadata,...

  • RE: Versioning

    You could take a look at this book on Team-based development:

    http://www.sqlservercentral.com/articles/books/71472/

    The ebook is free.

  • RE: Construct an EXECUTE string

    Instead of constructing a sql string containing a string representation of the parameters, you'd better use a command object and pass the parameters as such.

    Example:

    Dim cmd, sql, prm, conn

    Set cmd...

  • RE: a syntax error

    This should do:

    (Emp_Name=Case when @VarEmp_Name is not null Then @VarEmp_Name Else Emp_Name end)And

    Hope this helps,

    Gianluca

  • RE: Are the posted questions getting worse?

    GSquared (12/6/2010)


    Steve Jones - SSC Editor (12/6/2010)


    .... It's actually impossible to get a real person at google.

    Real people are overrated. I've had plenty of tech support people fail the...

  • RE: procedure call

    RETURN exits from current procedure and doesn't affect callers.

    command-1 will be executed.

Viewing 15 posts - 3,616 through 3,630 (of 5,394 total)