SELECT
  [UserDetailId] AS userdetailid,
  RTRIM([UserName]) AS username,
  RTRIM([Class]) AS class,
  RTRIM([CmsUserId]) AS cmsuserid,
  [MApprovalRuleLevel1] AS mapprovalrulelevel1,
  RTRIM([Level1ApprovalManager]) AS level1approvalmanager,
  RTRIM([Level2ApprovalManager]) AS level2approvalmanager,
  RTRIM([EmailAddress]) AS emailaddress,
  RTRIM([CreatedBy]) AS createdby,
  [CreatedOn] AS createdon,
  RTRIM([ModifiedBy]) AS modifiedby,
  [ModifiedOn] AS modifiedon,
  RTRIM([Level1DelegateTo]) AS level1delegateto,
  RTRIM([Level2DelegateTo]) AS level2delegateto,
  [MApprovalRuleLevel2] AS mapprovalrulelevel2,
  [MApprovalRuleLevel3] AS mapprovalrulelevel3,
  RTRIM([Level3ApprovalManager]) AS level3approvalmanager,
  RTRIM([Level3DelegateTo]) AS level3delegateto,
  RTRIM([Director]) AS director,
  RTRIM([QuoteManager]) AS quotemanager,
  [UserLevel] AS userlevel
FROM [PriceQuote].[dbo].[UserDetail]
