SQLite Forum

Switching data between two columns
Login
Greetings!

I messed up! Nothing new in my life. :-) So, I inserted the wrong data in two columns.  I know how to fix the problem with a small program, but I was wondering if there was a quick SQL call that I could do to fix the problem.  The real problem is that I have a table called t and I have inserted the data that should have gone to column c3 on c4.  And I also inserted the data that should have gone to c4 on c3.  The desire is to exchange the data found on c3->c4 and the data found on c4->c3. There are two constraints: ProjID and InsertDate. The table definition is thus,
```
CREATE TABLE t
    (
      ProjID,
      c1,
      c2,
      c3,
      c4,
      c5,
      InsertDate,
      PRIMARY KEY (ProjID,InsertDate)
    );
```
Thoughts?  thanks.

josé