  Given an o-minimal structure expanding the field of reals, we show a
piecewise Weierstrass preparation theorem and a piecewise Weierstrass division
theorem for definable holomorphic functions. In the semialgebraic setting and
for the structure of globally subanalytic sets and functions we obtain the
corresponding results for definable real analytic functions. As an application
we show a definable global Nullstellensatz for principal ideals.
