I have run the following script to create a view which provides the results I want:
SELECT ACTNUMBR_1, ACTNUMBR_2, ACTNUMBR_3, ACTNUMBR_1 + '-' + ACTNUMBR_2 AS Match_Account, ACTNUMBR_1 + '-' + ACTNUMBR_2 + '-' + ACTNUMBR_3 AS Full_Account_Number
FROM dbo.GL00100
but my data has gaps in the Match_Account and Full_Account_Number columns. See the output below:
I would like my account numbers to appear like - A100-000 OR A100-000-000.
What is the easiest way to remove all spaces on this view to achieve this?
Thanks,