Miscellaneous query examples

Only three main categories have been covered so far. There are some other modules that also need query reports from time to time.

Besides all other query examples in the book, some of the examples do not fit in any of the categories. Here is the place for these outstanding ones.

Case 4-X1: Query related to service call

A useful query is to show items from delivery (with Serial Number or Batch Number) which is under the 'expenses' tab on the service call form. The user having this request could not find the 'expenses' tab table. Trying to find the link between DLN1 and OSCL with 'Created from Service Call' failed because the base document related columns in DLN1 are always empty.

The solution is:

SELECT T1.DocNum from DBO.SCL4 ...

Get Mastering SQL Queries for SAP Business One now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.