SELECT G.group_code AS [Product Group],
G.group_descv6 AS [Group Description],
IM.category AS [Product Category],
C.cat_descv6 AS [Category Description],
IM.subcategory AS [Product Sub Category],
C1.cat_descv6 AS [Sub-category Description],
IM.product_code AS [Product Code],
IM.on_hand AS [Quantity Owned],
IM.descriptionv6 AS [Product Description],
IM.printeddesc AS [Printed Description],
R.rate_1st_day AS [Rate1st Day],
R.rate_week AS [Rate Week],
IM.unit_volume AS [Unit Volume],
IM.unit_weight AS [Unit Weight],
IM.rlength AS [Unit Length],
IM.rwidth AS [Unit Width],
IM.rheight AS [Unit Height],
Im.zcolor AS [Color],
IM.countryoforigin AS [Country of Origin],
IM.cost_price AS [Cost price],
IM.retail_price AS [Retail Price],
IM.wholesale_price AS [Wholesale Price],
IM.trade_price AS [Trade Price],
IM.cost_price AS [Cost Price],
IM.retail_price AS [Retail Price],
IM.asset_track AS [Asset Track],
IM.nontrackedbarcode AS [Non Tracked Barcode],
IM.mfctpartnumber AS [Part Number],
IM.zmodelno AS [Product Model Number],
IM.binlocation AS [Product Bin Location],
A.asset_code AS [Bar Code Number*],
A.serial_no AS [Serial Number*],
A.modelnumber AS [Model Number*],
a.vendorv8 AS [Vendor *],
Cast(R.rate_1st_day AS DECIMAL(12, 2)) AS [Rate1st Day],
Cast(R.rate_week AS DECIMAL(12, 2)) AS [Rate Week],
Cast(R.rate_long_term AS DECIMAL(12, 2)) AS [Rate Long Term],
Cast(R.replacementvalue AS DECIMAL(12, 2)) AS [Replacement Value]
FROM dbo.tblinvmas AS IM
LEFT OUTER JOIN dbo.tblgroup AS G
ON G.group_code = IM.groupfld
LEFT OUTER JOIN dbo.tblcategory AS C
ON C.category_code = IM.category
LEFT OUTER JOIN dbo.tblcategory AS C1
ON C1.category_code = IM.subcategory
LEFT OUTER JOIN dbo.tblratetbl AS R
ON R.productcode = IM.product_code
AND R.tableno = 0
LEFT OUTER JOIN dbo.tblasset01 AS A
ON A.product_code = IM.product_code
WHERE ( IM.product_type_v41 = 0 )
ORDER BY [product group],
[product category],
[product code]