swapping two values in db
From: Pascal Schmidt-Volkmar (pascalsv_at_nospam_tauth.com)
Date: 12/29/03
- Previous message: M Foley: "How to add two dbedit controls and post to a dbgrid"
- Next in thread: Bill Todd (TeamB): "Re: swapping two values in db"
- Reply: Bill Todd (TeamB): "Re: swapping two values in db"
- Reply: Dmeister: "Re: swapping two values in db"
- Reply: Brett Watters: "Re: swapping two values in db"
- Reply: Tony J Hopkinson: "Re: swapping two values in db"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Dec 2003 08:21:34 +0100
Hi there,
I have entries in my db, each having a unique number. Now I would like to
change two entries so they just swap their numbers.
example: entry A with number 2
entry B with number 3
later: entry A with number 3
entry B with number 2
How could this be done? I tried a stored procedure but I failed because
after changing the first of both values, the primary key was violated. Maybe
I do need a third variable to store one of the two numbers....
Thanks for any help!!
Pascal
- Previous message: M Foley: "How to add two dbedit controls and post to a dbgrid"
- Next in thread: Bill Todd (TeamB): "Re: swapping two values in db"
- Reply: Bill Todd (TeamB): "Re: swapping two values in db"
- Reply: Dmeister: "Re: swapping two values in db"
- Reply: Brett Watters: "Re: swapping two values in db"
- Reply: Tony J Hopkinson: "Re: swapping two values in db"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|