klaushaidinger.com

Icon

Delete all Products and Categories in Magento

This SQL-Script clears all Products and Categories without loosing the configuration (sys, attributes, …). Here we go …

Read the rest of this entry »

Recursive queries in SqlServer

WITH MeineGruppen(Parent, Subitem) as
(
— Base query
SELECT n_parent, n_lfdgruppe
FROM ugruppe
WHERE n_parent = 10625
UNION ALL
— Recursive query
SELECT me.Parent, dm.n_lfdgruppe
FROM MeineGruppen AS me
JOIN ugruppe AS dm
ON me.Subitem = dm.n_parent
WHERE me.Parent = 10625
)
SELECT * FROM MeineGruppen ORDER BY Subitem