How to remove all records of the table in Hybris?
Asked Answered
O

2

5

In my development environment, I have added wrong data to my custom ItemType. Now I want to remove all data for that Type. Basically I want to truncate my ItemType table.

Overeat answered 24/4, 2018 at 10:50 Comment(0)
I
12

Run the below Impex (Change MyItemType with your ItemType)

$targetType=MyItemType
REMOVE $targetType[batchmode=true];itemtype(code)[unique=true]
;$targetType

You can also run SQL query from HAC, refer this post for more detail

Irrawaddy answered 24/4, 2018 at 10:55 Comment(2)
Thanks for your prompt answer. As mentioned in post, I'll try SQL query to correct my data.Overeat
I am glad that post helps you!! If you need more help, edit the question with more details, I am happy to answer it.Irrawaddy
W
1

You can run this using commit mode on SQL Query in hac by giving TypePkString as input

delete FROM itemtype WHERE (TypePkString='8796149088338')
Wellinformed answered 11/4, 2023 at 4:43 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Wildee

© 2022 - 2024 — McMap. All rights reserved.