DO $$ DECLARE i INTEGER; BEGIN FOR i IN 1..1000 LOOP INSERT INTO m_product_category ( m_product_category_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, value, name, isdefault, plannedmargin, issummary ) VALUES ( -- Generate a random UUID for m_product_category_id get_uuid(), -- Use a constant for ad_client_id '39363B0921BB4293B48383844325E84C', -- Use a constant for ad_org_id '0', -- Set isactive to 'Y' 'Y', -- Use the current timestamp for created now(), -- Use a constant for createdby '100', -- Use the current timestamp for updated now(), -- Use a constant for updatedby '100', -- Generate a random value for value 'Value ' || i, -- Generate a random name for name 'Name ' || i, -- Set isdefault to 'N' 'N', -- Set plannedmargin to a random number between 0 and 100 random() * 100, -- Set issummary to 'N' 'N' ); END LOOP; END $$;