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.
Types in SQL - SAP ERP Tutorial
From the course: SAP Business One: Reporting and Customization
Types in SQL
- [Instructor] You just learned one use of the case, and I'd like you to show you one more. And an error you'll encounter often when using case. Add this around the Close Date column. So let's go to Close Date, and I'm going to do this and put CASE and then underneath that WHEN T0 Status = L THEN T0 CloseDate ELSE, and then I'll just put the string Not Closed. And then where instead of this, I'm going to put an END to end my case, and so we have this. And this is a case of using a full logical expression after the WHEN as we did with the WHERE. Often do we use it like this with one expression and then an ELSE. What this will do, is I'll print the close data if it's closed. Otherwise, instead of leaving it blank, the phrase Not Closed will be in the closed status. Now if you're going to run this, you'll find out very quickly, I'm going to hit Execute and you pick something, you get an error. And the error reads…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Use the Query Generator3m 2s
-
(Locked)
Open the Query Manager4m 5s
-
(Locked)
Change a query with SELECT, AS, and FROM6m
-
(Locked)
Debug a query4m 32s
-
(Locked)
Filter a query with WHERE5m 6s
-
(Locked)
Add selection criteria parameters4m 5s
-
(Locked)
Use SQL functions2m 50s
-
(Locked)
Sort a query with ORDER BY3m 29s
-
(Locked)
Make decisions with CASE4m 4s
-
(Locked)
Types in SQL3m 51s
-
(Locked)
Challenge: Sales report in SQL48s
-
(Locked)
Solution: Sales report in SQL4m 12s
-
(Locked)
-
-
-
-
-
-