You can execute this query using Excel Query Builder in RentalPoint..... |
SELECT A.product_code AS [Product Code],
I.descriptionv6 AS [Product Description],
A.asset_code AS [Bar Code],
LO.locn_name AS [Location],
A.stock_number AS [Stock Number],
A.serial_no AS [Serial Number],
A.modelnumber AS [Asset Model Number],
CASE
WHEN A.idisposaltype = 0 THEN 'Active'
WHEN A.idisposaltype = 1 THEN 'Sold'
WHEN A.idisposaltype = 2 THEN 'Lost/Missing'
WHEN A.idisposaltype = 3 THEN 'Stolen'
WHEN A.idisposaltype = 4 THEN 'Written Off'
ELSE '**E**'
END AS [Disposal Type],
CASE
WHEN A.servicestatus = 1 THEN 'Out for Maintenance'
WHEN A.servicestatus = 2 THEN 'Permanently Out of Service'
WHEN A.servicestatus = 0 THEN 'In Service'
ELSE '** E **'
END AS [Service Status]
FROM tblasset01 AS A
LEFT OUTER JOIN tblinvmas AS I
ON I.product_code = A.product_code
LEFT OUTER JOIN tbllocnlist AS LO
ON LO.locn_number = A.locn
LEFT OUTER JOIN tblgroup AS G
ON G.group_code = I.groupfld
WHERE A.idisposaltype NOT IN ( 0 )
OR A.servicestatus NOT IN ( 0 )
ORDER BY G.seqno,
I.seq_no,
a.stock_number