Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Order by date
Migrateduser
<p>I want to order the results of the report by date.</p>
<p>The select goes like this:</p>
<p> </p>
<div>select *</div>
<div>from ML001012 f</div>
<div>where</div>
<div>f.VERSION = (select max(VERSION) from ML001012 where DOCUMENTID = f.DOCUMENTID) and</div>
<div>TO_DATE(TXT_PROD, 'dd/mm/yyyy') between </div>
<div>TO_DATE(?, 'dd/mm/yyyy') and</div>
<div>TO_DATE(?, 'dd/mm/yyyy')</div>
<div>order by TO_DATE(TXT_PROD, 'dd/mm/yyyy') asc</div>
<div> </div>
<div>But I'm getting results like :</div>
<div>01/10</div>
<div>01/11</div>
<div>01/12</div>
<div>02/08</div>
<div>02/09</div>
<div>02/12</div>
<div>Instead of:</div>
<div>02/08</div>
<div>02/09</div>
<div>01/10</div>
<div>01/11</div>
<div>01/12</div>
<div>02/12</div>
<div> </div>
<div>What is funny is that I have another report with the same query as described above, but in THAT report, the order by works.</div>
<div> </div>
<div>I attached the 2 reports so you guys can take a look(info_terceiros_estoques.rptdesign is the one where the order by works perfectly). </div>
<div>Thanks in advance.</div>
Find more posts tagged with
Comments
There are no comments yet