Page 1 of 1
SQL statement to update boolean field
Posted: Fri Sep 11, 2020 2:09 pm
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 ('????')
Re: SQL statement to update boolean field
Posted: Fri Sep 11, 2020 3:33 pm
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
Re: SQL statement to update boolean field
Posted: Wed Sep 16, 2020 10:19 am
by Terkelsen
Hi Jan,
Sorry for my late response.
These were my first thought too, but none of them seems to work.
Re: SQL statement to update boolean field
Posted: Wed Sep 16, 2020 10:28 am
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?
Re: SQL statement to update boolean field
Posted: Fri Sep 18, 2020 11:31 am
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"]'
Re: SQL statement to update boolean field
Posted: Fri Sep 18, 2020 11:33 am
by jan_suhr
Great