While loop

  • Keep looking for he error where there is non...

    Nice puzzle.

  • good one !!!

    Thanks
    Vinay Kumar
    -----------------------------------------------------------------
    Keep Learning - Keep Growing !!!

  • WayneS (10/11/2012)


    honza.mf (10/11/2012)


    Hugo Kornelis (10/11/2012)

    Transactions (that's what "TRAN" is short for) are primarily used to ensure that a series of statements that form a single unit of work are either completely executed, or not at all. The classic example is the bank account - if I pay you 500 dollars, that amount is subtracted from my account and added to your account. Assuming that this is implemented using two update statements, we both prefer that either both statements succeed, or both statements fail. (Okay, I guess I may have a slight preference for both failing, whereas both succeeding would be your first choice;-)). Neither of us want the statement that takes money from my account to succeed and the statement that adds it to yours to fail, as that would make the 500 dollars disappear completely. This can be ensured by starting a transaction first, then checking for errors, and either forcing a rollback of the entire transaction (if anything went wrong), or committing the entire transaction (is all went okay).

    If the update that subtracts from your account fail and the later will succeed, you both will be happy. :w00t:

    True... but the other party in this transaction (the bank) won't be.

    Right. Who cares?

    The bank of course, so they have transactions properly implemented (we must hope).



    See, understand, learn, try, use efficient
    © Dr.Plch

  • honza.mf (10/12/2012)


    Right. Who cares?

    The bank of course, so they have transactions properly implemented (we must hope).

    In the UK at least, such processes work entirely in the bank's favour. Transaction 1 - the money is taken from the source account, and inserted into the bank's own funds. Transaction 2 - anything from a few minutes to a few days later, if you're lucky, the money is then taken from the bank and inserted into the destination account.

  • Toreador (10/23/2012)


    honza.mf (10/12/2012)


    Right. Who cares?

    The bank of course, so they have transactions properly implemented (we must hope).

    In the UK at least, such processes work entirely in the bank's favour. Transaction 1 - the money is taken from the source account, and inserted into the bank's own funds. Transaction 2 - anything from a few minutes to a few days later, if you're lucky, the money is then taken from the bank and inserted into the destination account.

    Yes. Our banks during foreign currencies transactions waited several days (up to one month) and then made the proper money transfers to dates with best exchange rates (for them). Aren't they cute?



    See, understand, learn, try, use efficient
    © Dr.Plch

  • Toreador (10/23/2012)


    honza.mf (10/12/2012)


    Right. Who cares?

    The bank of course, so they have transactions properly implemented (we must hope).

    In the UK at least, such processes work entirely in the bank's favour. Transaction 1 - the money is taken from the source account, and inserted into the bank's own funds. Transaction 2 - anything from a few minutes to a few days later, if you're lucky, the money is then taken from the bank and inserted into the destination account.

    That ceased to be true quite some time ago. In the days when there wasn't much computerisation, money or credit transfer between different banks, or even different branches of the same bank, was by moving pieces of paper and that couldn't be done as a single operation. By the mid 90s, at least for every bank I had dealings with, transfer between two accounts with the same bank was done as a single (distributed) transaction - money into one account and out of another, no staging through the bank's own funds; so for example I could trasfer funds from my account in Bristol to my son's account in Edinburgh by dropping in to a branch in Manchester and asking a teller to do it for me, and would be given confirmation that the money was in my son's account instantaneously (I actually did that more than once). With the new fast payment system, which has been in operation for a few years now, transfers between accounts in different banks are very fast too, but I don't know whether they are a single transaction or not (I think not). If your banks isn't using FPS, and is still taking days with the money in neither account to move money, maybe you should change to one that is.

    Tom

  • L' Eomot Inversé (10/23/2012)


    That ceased to be true quite some time ago.

    I don't think you're right on that. With intra-bank transfers, the confirmation meessage I get tells me it will take 'a few minutes' to appear in the destination account; it's possible that it actually is instant but they're managing expectations in some way, though it seems unlikely they'd pretend to be less efficient than they actually are. Inter-bank transfers using FPS say "a few hours", and those not using FPS (there are still some) "a few days".

  • Good question. Thanks for submitting.

    http://brittcluff.blogspot.com/

  • the only question here is "how is TSQL making implicit conversion in 10/0.00001" ?

    obviously this is real conversion and there is no need to trap hence no error

Viewing 9 posts - 31 through 38 (of 38 total)

You must be logged in to reply to this topic. Login to reply