problem in sql

oscarea
Member Posts: 6
Dear friends, I have a problem with Navision financials 2.6 SQL, I execute a listing of products and of each product I consent to the table 32 of mov. of products to take out certain information (with a repeat_____until, reset in each product of the chart 32), the first time it leaves me well, but I throw it without leaving the program again and they don't leave the same data, I have been able to see that making the repeat ____ until becomes crazy and he/she begins to repeat a product. It is as if the repeat to execution half lost the filter.
Somebody can help me.
<img border="0" title="" alt="" src="images/smiles/icon_sad.gif" />
Somebody can help me.
<img border="0" title="" alt="" src="images/smiles/icon_sad.gif" />
0
Comments
-
THIS IS THE CODE:
RecProd.RESET
IF RecProd.FIND(‘-‘ <img border="0" title="" alt="" src="images/smiles/icon_wink.gif" /> THEN REPEAT
MP.RESET;
MP.SETCURRENTKEY("Tipo movimiento","Subtipo movimiento","Nº producto","Fecha registro");
MP.SETRANGE("Nº producto",RecProd."Nº producto");
MP.SETRANGE("Tipo movimiento",MP."Tipo movimiento"::Compra);
MP.SETRANGE("Cód. procedencia mov.",Proveedor);
MP.SETFILTER("Fecha registro",'>=%1&<=%2',Rec."Fecha ini analisis",Rec."Fecha fin analisis");
IF MP.FIND ('-') THEN REPEAT
T1 := T1 + MP.Cantidad*MP."Precio neto comercial";
T2 := T2 + MP.Cantidad*MP."Precio neto final";
T3 := T3 + MP.Cantidad*MP.PVP;
UNTIL MP.NEXT=0;
UNTIL RecProd.NEXT=0;
THANKS.0 -
thanks, but the problem continues existing, I have removed the range that not this in the key and the first one makes it to me well and it can be that the second also, but the third report already makes it to me bad, I have looked at the information that he/she goes taking out and a moment that loses the filter of the product arrives and you doesn't come out but rather it continues, it finishes that product and then he/she makes the other ones but with the filter of the previous one.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions