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.

Filter a query with WHERE

Filter a query with WHERE - SAP ERP Tutorial

From the course: SAP Business One: Reporting and Customization

Start my 1-month free trial

Filter a query with WHERE

- [Instructor] We've got a production order list, but it's raw data. I'd like to look at things that are significant. If this is a list of work in progress or to be started, I can get rid of all those closed status orders. That's where the WHERE clause in the SQL is for. After the FROM clause, add the keyword WHERE. Again, as a convention for understanding, we write keywords in all caps. I'll create a logical expression, which is true, after the keyword and those rows will show. Any row where it is false, won't. For example, I can add T zero dot Status equals P and this time make sure you're using the single quotes or you're going to get an error. This will say that my status will match P. If I execute this one, I'll get only planned. If you have a second way to filter the data, you use AND, and another expression. For example, if I want all production orders due before January 1, 2009, I would add AND T zero dot…

Contents