Discussions
Categories
- 197K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.8K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 556 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.4K SQL Developer
- 296.3K Development
- 17 Developer Projects
- 139 Programming Languages
- 293K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 158 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 205 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 468 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
OPEN INTERFACE FOR ITEM CATEGORY

Hi All,
I have tried to update the existing category for an item trough open interface but category is not updating So Please help and give suggestions on this . I am sending my code So please see and give any suggestions need in the query.
INSERT INTO mtl_item_categories_interface
( category_set_id
,category_id
,last_update_date
,ORGANIZATION_CODE
,process_flag
,inventory_item_id
,old_category_id
,transaction_type
,set_process_id
)
VALUES
( 1000000015 -- category_set_id
,1513 -- new category_id
,SYSDATE
,'V1' -- ORGANIZATION_CODE (should be master_orgaization_id if category set is controlled at master level)
,1 -- always 1
,380989 -- Item name Note: for performance consideration use inventory_item_id in place of item_number
,2257 -- old category_id
,'UPDATE'
,555 -- set_process_id can be any positive number
);
commit;
Best Answer
-
mysql> INSERT INTO mtl_item_categories_interface -> ( category_set_id -> ,category_id -> ,last_update_date -> ,ORGANIZATION_CODE -> ,process_flag -> ,inventory_item_id -> ,old_category_id -> ,transaction_type -> ,set_process_id -> ) -> VALUES -> ( 1000000015 -- category_set_id -> ,1513 -- new category_id -> ,SYSDATE -> ,'V1' -- ORGANIZATION_CODE (should be master_orgaization_id if category set is controlled at master level) -> ,1 -- always 1 -> ,380989 -- Item name Note: for performance consideration use inventory_item_id in place of item_number -> ,2257 -- old category_id -> ,'UPDATE' -> ,555 -- set_process_id can be any positive number -> );ERROR 1054 (42S22): Unknown column 'SYSDATE' in 'field list'
You need to use "SYSDATE()" in mysql. (Or NOW() or CURRENT_DATE(), depending on what you actually want. See the documentation link for the differences).
mysql> INSERT INTO mtl_item_categories_interface -> ( category_set_id -> ,category_id -> ,last_update_date -> ,ORGANIZATION_CODE -> ,process_flag -> ,inventory_item_id -> ,old_category_id -> ,transaction_type -> ,set_process_id -> ) -> VALUES -> ( 1000000015 -- category_set_id -> ,1513 -- new category_id -> ,SYSDATE() -- last_udate_date datatype DATETIME -> ,'V1' -- ORGANIZATION_CODE (should be master_orgaization_id if category set is controlled at master level) -> ,1 -- always 1 -> ,380989 -- Item name Note: for performance consideration use inventory_item_id in place of item_number -> ,2257 -- old category_id -> ,'UPDATE' -> ,555 -- set_process_id can be any positive number -> );Query OK, 1 row affected (0.00 sec)
https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html
mysql> select now(), sysdate(), current_date();+---------------------+---------------------+----------------+| now() | sysdate() | current_date() |+---------------------+---------------------+----------------+| 2017-08-20 03:25:06 | 2017-08-20 03:25:06 | 2017-08-20 |+---------------------+---------------------+----------------+1 row in set (0.00 sec)
Answers
-
What, if any, errors are you seeing after entering the query. Also include 'SHOW CREATE TABLE mtl_item_categories_interface' too.
Dave Stokes
MySQL Community Manager
-
mysql> INSERT INTO mtl_item_categories_interface -> ( category_set_id -> ,category_id -> ,last_update_date -> ,ORGANIZATION_CODE -> ,process_flag -> ,inventory_item_id -> ,old_category_id -> ,transaction_type -> ,set_process_id -> ) -> VALUES -> ( 1000000015 -- category_set_id -> ,1513 -- new category_id -> ,SYSDATE -> ,'V1' -- ORGANIZATION_CODE (should be master_orgaization_id if category set is controlled at master level) -> ,1 -- always 1 -> ,380989 -- Item name Note: for performance consideration use inventory_item_id in place of item_number -> ,2257 -- old category_id -> ,'UPDATE' -> ,555 -- set_process_id can be any positive number -> );ERROR 1054 (42S22): Unknown column 'SYSDATE' in 'field list'
You need to use "SYSDATE()" in mysql. (Or NOW() or CURRENT_DATE(), depending on what you actually want. See the documentation link for the differences).
mysql> INSERT INTO mtl_item_categories_interface -> ( category_set_id -> ,category_id -> ,last_update_date -> ,ORGANIZATION_CODE -> ,process_flag -> ,inventory_item_id -> ,old_category_id -> ,transaction_type -> ,set_process_id -> ) -> VALUES -> ( 1000000015 -- category_set_id -> ,1513 -- new category_id -> ,SYSDATE() -- last_udate_date datatype DATETIME -> ,'V1' -- ORGANIZATION_CODE (should be master_orgaization_id if category set is controlled at master level) -> ,1 -- always 1 -> ,380989 -- Item name Note: for performance consideration use inventory_item_id in place of item_number -> ,2257 -- old category_id -> ,'UPDATE' -> ,555 -- set_process_id can be any positive number -> );Query OK, 1 row affected (0.00 sec)
https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html
mysql> select now(), sysdate(), current_date();+---------------------+---------------------+----------------+| now() | sysdate() | current_date() |+---------------------+---------------------+----------------+| 2017-08-20 03:25:06 | 2017-08-20 03:25:06 | 2017-08-20 |+---------------------+---------------------+----------------+1 row in set (0.00 sec)