Re: invert tinyint column

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Vishal Parkar (REMOVE_THIS_vgparkar_at_yahoo.co.in)
Date: 10/08/04


Date: Fri, 8 Oct 2004 19:33:47 +0530

try following sequence of update statements:

begin transaction
update <table> set col_1 = 2
where col_1 = 1
update <table> set col_1 = 1
where col_1 = 0
update <table> set col_1 = 0
where col_1 = 2

--check the data and issue commit/rollback accordingly.

-- 
Vishal Parkar
vgparkar@yahoo.co.in | vgparkar@hotmail.com


Relevant Pages

  • RE: CommitBatchSize vs. CommitBatchThreshold for transactional dis
    ... " I issued the same 7 update statements as in test 1. ... saw one batch with 6 update statements (all with the same transaction ... ID) followed by a second batch with 1 update statement (different ... commitbatchthreshold would as its 11 commands. ...
    (microsoft.public.sqlserver.replication)
  • Re: Float Types Used as Primary Key on SQL 2005
    ... I am working with single row which keeps track of sequence ... @NEXTSEQ FLOAT OUTPUT, ... @Err INT OUTPUT ... ROLLBACK TRANSACTION ...
    (microsoft.public.sqlserver.programming)
  • Re: CICS VSAM Return Code 21 on Write
    ... each transaction that writes a record for this test is not running concurrently at this time. ... 000010 /* THIS IS THE JCL FOR DEFINING THE DAC VALIDATION LOGFILE ALTERNATE ... CICS VSAM Return Code 21 on Write ... Return code 21 is described as a 'sequence error' on write. ...
    (bit.listserv.ibm-main)
  • Re: How to generate unique document number ?
    ... Do not use the cache on a sequence. ... transaction, or an error may occur, causing the transaction to ... By creating an autonomous transaction - still possible to ... get missing numbers. ...
    (comp.databases.oracle.server)
  • Re: Deadlock on an identity field table
    ... Thanks David, that changed us from 90% transaction failure on 16 threads to ... 1280 transactions a minute on the same thread count with no sequence problems ... >> The result is used to provide unique keys for multiple tables. ...
    (microsoft.public.sqlserver.programming)