Forum Replies Created

Viewing 15 posts - 151 through 165 (of 374 total)

  • RE: T-Sql rant

    One correction to your pseudo code

    update tbl set seq = tbl.seq + 1 where seq > 2

    Should be

    update tbl set seq = tbl.seq + 1 where seq >= 2

    because you...

  • RE: T-Sql rant

    I would keep it simple. Deal with one record at a time. If your Stored Procedure is designed to work fine with one record you can call it sequentially with...

  • RE: Out Of Sequence OrderID Generated after Blocking

    The Identity field is not going to be created out of sequence. But two records next to each other could have the same creation time. You have to realise one...

  • RE: T-Sql rant

    Just

    UPDATE

    sequence = sequence + 1

    WHERE sequence >= @Sequence

    and then insert your new record.

    You do not need a loop for this

  • RE: Out Of Sequence OrderID Generated after Blocking

    What is the front end to this? A web application? What I do not understand is if the calls are made sequentially or not. If the calls are made sequentially...

  • RE: T-Sql rant

    Lynn Pettis (3/18/2009)


    foxjazz (3/18/2009)


    {} is much better than BEGIN BEGIN BEGIN BEGIN END END END END

    For you, perhaps. I find BEGIN END just fine. Remember I did come...

  • RE: Code not displayed properly

    I think the editor should automatically translate the less then and more then into HTML escape sequences. I do not use HTML that frequently to remember all the escape sequences....

  • RE: dynamic sql?

    salesMonth lessorequal @month and YTD = 0 OR salesMonth = @month and YTD notequal 0

    S....:angry:

    I am having problems with posting the correct code so I used words lessorequal and notequal...

  • RE: dynamic sql?

    salesMonth 0

    The bolded code should be like this. For whatever reason the forum's editor messed up the code when it got posted.

  • RE: dynamic sql?

    select x.salesYr, x.Group from (select salesYr,

    CommericalSales = ISNULL((Select (SUM(Sales) from tblsSales where group = 'Commercial' and salesYear = y.SalesYear

    and ( salesMonth 0 )

    and Pending = @PendingDeals)),0),

    ResSales...

  • RE: Out Of Sequence OrderID Generated after Blocking

    Yep, I do not see the logic behind this as well so it is hard to give a valueable answer. I noticed that most issues people have with the SQL...

  • RE: Cause a Loss of Precision to Fail

    Are you dealing with INTs or it was just an example.

    I am assuming it was just an example and that you are going to be using DECIMAL or something of...

  • RE: Out Of Sequence OrderID Generated after Blocking

    I do not know if Jack's suggestion is going to work for you because it does not look from the presented sample data like the pairs are tied up by...

  • RE: filter datetime

    I think it is better to have VS2003 to do the formatting. You have at least the following options: You can use the ToShortDateString method (which will use the Windows...

  • RE: T-Sql rant

    foxjazz,

    You are like this guy who learnt how to use a hammer. For him the only way to join two pieces is by using a nail. He does not grasp...

Viewing 15 posts - 151 through 165 (of 374 total)