Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
sql query to sort date
padytom
<p>i am creating a simple report that i want to sort date from february to december 2014. need help with sql and filter condition to apply in the design professional</p>
Find more posts tagged with
Comments
mandreas
<p>Hi</p>
<p>I asume, that you have the existing reports. Have a look at one of them - for example open_tickets.rptdesign. You will find the basic-selection in the <strong>script-section </strong>of the dataSet.</p>
<p>...</p>
<p>sqlText = "select ticket.ticketid, ticket.description, ticket.class, ticket.status, ticket.internalpriority, ticket.reportdate,"</p>
<p>+ " ticket.affectedperson, ticket.owner, ticket.ownergroup, ticket.commodity, ticket.commoditygroup,"</p>
<p>+ " ticket.targetstart, ticket.actualstart, ticket.siteid, synonymdomain.maxvalue as ticket_class"</p>
<p>+ " from ticket inner join synonymdomain on ticket.class = synonymdomain.value and synonymdomain.domainid = 'TKCLASS'"</p>
<p>+ " where ticket.status in"</p>
<p>+ " (select value from synonymdomain where synonymdomain.maxvalue not in ('RESOLVED', 'CLOSED')"</p>
<p>+ " and synonymdomain.domainid in ('INCIDENTSTATUS', 'PROBLEMSTATUS', 'SRSTATUS')) and " + where</p>
<p>+ " <strong>order by </strong>ticket.status, ticket.internalpriority, ticket.<strong>reportdate</strong>";</p>
<p> </p>
<p>Additionaly you have Sorting and Filters tabs in the Property-Editor, if you select the Table (Layout).</p>