You could use while in your UDF.
On 14 November 2013 16:11, Ruslan Al-Fakikh <metarus...@gmail.com> wrote: > There is no such control logic in Pig. > > Maybe the FOREACH statement can help, but it's not a loop, but rather a > processing operator. > Also we may want to use Pig Embedding to launch pig from other languages. > > Thanks > > > On Wed, Oct 30, 2013 at 11:45 AM, Murphy Ric <murphyricha...@gmail.com > >wrote: > > > I have a code in SQL to convert to Pig. I request for your help in > > converting this code. > > > > WHILE @Dt1 <= @Dt2 > > BEGIN > > INSERT INTO ( , , , ) > > SELECT , , , , > > WHERE X > Y > > SELECT @Dt1 = SELECT DATEADD(MM,1,@Dt1)) > > END > > >