How do you get the dates? From a dialog? If so, then vedate might be a text value, and that might be your problem.
Bill On 27 Jul 2004 at 12:56, Marc wrote: > > Hi all > > Below is part of some code that has been working for several > years from 6.1, 6.5++ and I think earlier versions of 7.1. > > But with the latest build the program locks up or I should > stalls on the second INSERT command. > > I can do this with a date range of 1 year and it runs in > about 5 minutes in 6.5++ but trying the same thing in > 7.176 it takes over 10 min and never finishes. When I > do Ctrl Alt Del, it says RBase is nonresponsive. > > I even tried with whileopt off, no luck. > > What would causse this??? > thanks > Marc > > > > WHILE vxdate BETWEEN .vsdate AND .vedate THEN > -- set var vsdate = (.vsdate + 1) > -- select max(aptdate) into vsdate from aptdate > INSERT INTO aptdate (aptdate,ampm) VALUES (.vxdate,'M') > SET VAR vxdate = (.vxdate + 1) > ENDWHILE > DELETE DUPLICATES FROM aptdate > INSERT + > INTO aptbook (aptdate,apttime,ampm) SELECT > t1.aptdate,t2.apttime,t2.ampm + FROM aptdate t1, apttime t2 WHERE > aptdate BETWEEN .vsdate AND .vedate + ORDER BY aptdate,apttime CLS > LABEL addmend > RETURN > > -- Bill Downall [EMAIL PROTECTED] 317.297.3810 ******************************** Notice: The ISP for our domain, SBC Ameritech, is currently having a problem keeping up with the volume of email and spam going through their mail servers. This means that sometimes mail gets through to and from us immediately, and sometimes the SBC Ameritech web hosting mail servers get constipated, so that delivery of mail to or from downallconsulting.com can be delayed by as much as half a day. If your message is urgent, please follow up with a telephone call. *****************************************
