Jump to content

philirving

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About philirving

  • Rank
    Newbie
  1. I want to NOT complete the transaction if there is no record with AcctNum="1001". For instance: begin transaction; update Accounts set Bal=Bal-250 where AcctNum="1001"; update Accounts set Bal=Bal+250 where AcctNum="2002"; commit transaction When I do this (in SQLite) AcctNum 2002 gets the 250 even if there is no record AcctNum="1001". How can I stop the transaction, and perhaps show an error message? Very simple table to test with: create table [Accounts] ( [AcctNum] char[4] primary key not null, [Bal] real ) ; insert into Accounts values ("2002",500.0); insert into Accounts values
×
×
  • Create New...