From the course: SAP Business One: Reporting and Customization

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Sort a query with ORDER BY

Sort a query with ORDER BY - SAP ERP Tutorial

From the course: SAP Business One: Reporting and Customization

Start my 1-month free trial

Sort a query with ORDER BY

- [Instructor] Right now, I have to scroll to the bottom to see the latest due date. I can also double-click a column and get the sort date, and then I can sort it properly that way. But, that's taking a lot of work and we can actually do it all with another keyword called order by in my query automatically. So let's go back up to the query here and then after our where clause, the next clause that will need to go in a sequence is order by. It's order by, as two words. And I'm going to sort by the due date so I'm going to add T0.DueDate. I can execute this query. And I'm going to use released for mine, and go ahead and hit that. And we get the released ones. I have a few. And they're sorted by oldest first. If I want my most recent first I can use another keyword that says descending. So you just put after this, D-E-S-C and hit it again. I'll do released. And now they've changed their order around. So now…

Contents