I have a string thats 50 characters. If the length of the string is 14 then i can take the first 14 characters. Which works fine...
set @InvoiceLength = LEN(@InvoiceNumber)
If @InvoiceLength < 15
begin
set @InvoiceNumberFormatted = SUBSTRING(@InvoiceNumber,1,14)
End
If the String length is Greater than 14 then i need to right justify the string and take the last 14 characters. How do i do this part. Thanks.
set @InvoiceLength = LEN(@InvoiceNumber)
If @InvoiceLength < 15
begin
set @InvoiceNumberFormatted = SUBSTRING(@InvoiceNumber,1,14)
End
If the String length is Greater than 14 then i need to right justify the string and take the last 14 characters. How do i do this part. Thanks.