Hi, I am programming a Stored Procedre. I just need to know how to embed MS SQL Server 2000 Functions inside my Select Statement. Here is what i am trying to do on a small scale.<BR><BR>SET @sSQL = 'SELECT<BR> C.CompanyID,<BR> PR.RgnLongName,<BR> E.EmpName,<BR> E.AUC4,<BR>RIGHT (('0000' + CAST(B.BranchNbr AS VARCHAR(4))),4) AS BranchNbr,<BR> RR.Descrip as RPSRegion'<BR><BR>I do not know how to use the Sql functions like "Right" inside of a Stored Procedure String. I tried all sorts of things but not sure how to dereference it if you will. I just get an error pointing to the '0000'