Forum Replies Created

Viewing 10 posts - 1,351 through 1,360 (of 1,360 total)

  • Reply To: Can't add user to db_owner role

    You're using SSMS and error says it's timing out.  What is the timeout setting in your SSMS?

    In SSMS menu go to Tools, Options, Query Execution, then General.  The 3rd item...

  • Reply To: Using Begin & Commit inside a Stored Procedure

    Agree try/catch is primarily for error capture.  Partial rollbacks are not common in my experience.  Sql clients could cache partial form input however they do it.

    In theory something could be...

  • Reply To: In-Memory OLTP - N00b Question

    Here's the list of unsupported features in MOT.  No triggers has made it not easy (and not even tried in some cases) to migrate to for some of my projects. ...

  • Reply To: SQL equivalent to NORM.DIST Excell function?

    mharbuz wrote:

    I was wondering how I would go about calculating the normal distribution for a number of values, specifically the Probability Density Function.

    How many data points and over what interval...

  • Reply To: SQL equivalent to NORM.DIST Excell function?

    Standard deviation is the square root of the variance

  • Reply To: Using Begin & Commit inside a Stored Procedure

    "after several updates and inserts..."

    Maybe it's worth asking... does your procedure specify 'set xact_abort on'?  When a proc has multiple DML statement in a transaction and without xact_abort setting can...

  • Reply To: Stored Procedure code understanding

    Hi I posted this answer before but it appears to be marked as SPAM.  Not sure why.  This site has an annoying text editor.

     

    What this code is doing.

    1. Declares 3...

    • This reply was modified 5 years, 4 months ago by  Steve Collins.
  • Reply To: Stored Procedure code understanding

    This was removed by the editor as SPAM

  • Reply To: Store Procedure...

    Yes exactly.  Something like:

    drop proc if exists wm.api_comment_post;

    go

    create proc wm.api_comment_post

    @securitystamp uniqueidentifier,

    @cw_id bigint,

    @comment nvarchar(1024),

    @test_id bigint output,

    @response nvarchar(max) output

    as

    set nocount on;

    set xact_abort on;

    begin transaction

    begin try

    declare

    @awc_id bigint;

    insert comments(u_id, w_id, cw_id, comment, created_dt, edited_dt)

    select

    wm.func_user_id(@securitystamp),

    cw.w_id,

    cw.cw_id,

    @comment,

    sysutcdatetime(),

    sysutcdatetime()

    from

    wm.class_workouts...

  • Reply To: Store Procedure...

    Reasons to use output parameters in stored procedures:

    1. To return db keys generated within the procedure
    2. To return data (version id's, timestamp's, etc) which changed/updated as a result of actions...

Viewing 10 posts - 1,351 through 1,360 (of 1,360 total)