Forum Replies Created

Viewing 12 posts - 16 through 27 (of 27 total)

  • RE: Updating Unique Sequential NUmber

    Ok many thanks for all the contributions.

    So. I think we are down to the following options :

    1. Use Locks during the update with also a constraints rule

    or

    2....

  • RE: Updating Unique Sequential NUmber

    OK thanks for that.

    But I dont understand how the database Engine will prevent (without additional error checking or rules) TWO ACCOUNTS WITH THE SAME NUMBER BEING ADDED. Two selects 'COULD'...

  • RE: Updating Unique Sequential NUmber

    I have given a very simple example , as i dont have specific code, and am currenlty actually writing the code.

    The example of updating a Table with just two fields,...

  • RE: Updating Unique Sequential NUmber

    But the issue I have is that I dont think an if will suffice to determine if the account already exists.

    If two users run the code:

    If exists(selectAcnum from...

  • RE: Updating Unique Sequential NUmber

    Ok, I will have a look at the Merge. Thanks for your help

    Re design, yes there is a details row for the customer, but for quick reports and enquiries, I...

  • RE: Updating Unique Sequential NUmber

    The AccountNum field will identify the account. This will have come from an Customer master table and the table I am updating is a Balances Table (Just to hold balances...

  • RE: Updating Unique Sequential NUmber

    Business Rules , in broad terms , would be If the First transaction has a new account, and the second transaction has a new account and both update 'at the...

  • RE: Updating Unique Sequential NUmber

    Hi jack. Thanks for replying.

    Ok I see what you are saying. but this does not seem like a very elegant way to do it.

    Is there no structures/code within Sql Server...

  • RE: Updating Unique Sequential NUmber

    Hi Lynn.

    At this stage, I am doing some experimenting and want to explore the most effective way of doing things.

    I can give you pseudo code (as I am not sure...

  • RE: Updating Unique Sequential NUmber

    Hi Lynn

    Sorry, but I'm not answering any questions until mine have been answered.

    Why the SELECT/UPDATE structure?

    What is it giving you?

    This is my first post in this forum, working around the...

  • RE: Updating Unique Sequential NUmber

    Hi Lynn. Thanks for that.

    Just 2 questions:

    1. Instead of using the two locks, can I use an IsolationLevel instead. I am not sure if the framework I am using allows...

  • RE: Updating Unique Sequential NUmber

    Hi Jack. Thanks for your reply.

    If the other user can read, won't this cause a problem when he goes to update ?

    Take a very simple example:

    Table has CustomerRow with 2...

Viewing 12 posts - 16 through 27 (of 27 total)