convert access boolean field value to oracle field value
Posted on 2009-07-01
We have a dynamic series of insert queries that get run on an Access DB from dotnet program. We have duplicated the tables in Oracle (don't ask why) and these table need to get updated with the same queries. One problem I've seen so far is the boolean (Yes/No) Access fields we have converted to char(1) fields in Oracle so when it tries to insert using the query:
INSERT INTO ITEMMASTER
(StoreNum, BatchNumber, FileType, SKU, DESCRIPTION, ACTIVE, PRD_LVL_CHILD, PRD_LVL_PARENT)
VALUES (427, '2009051819010600', 'I', 29254, 'Kool Family B1G1F Sng Pk-Test-Inactive', -1, 27480, 205)
for example the -1 doesn't fit in the char(1) field. Can we do something like put a trigger on the ACTIVE field and convert the -1 value into '1' so it will fit?