Simon
04/09/2024, 8:23 PMAnthony Nooren
04/09/2024, 9:26 PMSELECT
t.id,
l.location,
BUILTIN.DF(l.location) as locationname
FROM
transaction t
INNER JOIN transactionline l on t.id = l.transaction
WHERE
t.type = 'SalesOrd' AND
l.mainline = 'T'
FETCH FIRST 10 ROWS ONLY
If you only want location for sales orders by the main line then adding the mainline = 'T' would be needed kind of like searches.
JOIN syntax for tables can be found in the records catalog (.../app/recordscatalog/rcbrowser.nl)
SELECT TOP 10 is similar to FETCH FIRST 10 ROWS ONLY, just another way to do it.
BUILTIN.DF gets the name of the location, but you can also add another join to the location table to get that dataSimon
04/09/2024, 9:28 PM