SQL statement to update boolean field

Post Reply
User avatar
Terkelsen
Advanced member
Posts: 297
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

SQL statement to update boolean field

Post by Terkelsen »

I'm using the database module of Switch to update an Access database, which works just fine. However, the database has a boolean field (a checkbox). Any idea what would be the sql statement to toggle that field?

UPDATE Webshop (Produktionsklar)
VALUES ('????')
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: SQL statement to update boolean field

Post by jan_suhr »

Have you checked what's in the database field in the database.

Could it be True or False or maybe 1 or 0
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
User avatar
Terkelsen
Advanced member
Posts: 297
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

Re: SQL statement to update boolean field

Post by Terkelsen »

Hi Jan,

Sorry for my late response.

These were my first thought too, but none of them seems to work.
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: SQL statement to update boolean field

Post by jan_suhr »

Do you have any kind of database editor that you can access the Db directly and read what it says on that field?
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
User avatar
Terkelsen
Advanced member
Posts: 297
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

Re: SQL statement to update boolean field

Post by Terkelsen »

Well, it turned out that 0 and 1 indeed were the triggers to use, so I finally got this statement to turn the check box on:

UPDATE Webshop
SET Produktionsklar=1
WHERE OrdreID='[Metadata.Text:Path="/Impleo_JobTransaction/TopOrderID",Dataset="Xml",Model="XML"]'
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: SQL statement to update boolean field

Post by jan_suhr »

Great
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
Post Reply