I am trying to pad 10 chars (i.e. 51 would be 0000000051)
Here is what I have (obviously doesnt work). Its the UDI column and I need to concat the values that I have listed.
DECLARE @ProcDate DATETIME
DECLARE @SessionID INT
SET @SessionID = 1503152
SET @ProcDate = '20100914'
INSERT INTO [dbo].[Archive] (
@ProcDate + 'nr' + SELECT RIGHT(REPLICATE(0, 10) + @SessionID, @ProcDate + 'nr',
*** Please allow me to mark threads as answered and I will, Thank you ***
View Complete Post