SELECT
  ProspectID,
  ProductCategory,
  ProductSubGroup,
  IF(TRIM(CONCAT(ProductSubGroup, '')) = '', CONCAT(ProductCategory, ''),
      CONCAT(TRIM(CONCAT(ProductCategory, '')), ' - ', TRIM(CONCAT(ProductSubGroup, '')))) AS Product,
  SalesPersonID,
  SpecialistUserID,
  DateQuoted,
  SalesPhaseID,
  DateExpected,
  FollowUpDate,
  DateSigned,
  LiveDate,
  QuotedAmount,
  ProductID,
  BatchID,
  AccountBookID,
  BranchQuotes
FROM
  taProspectProduct
WHERE
  (ProspectID = @nProspectID)
