Simple join between 2 tables with unusual structure I have two tables as below

ACCOUNTS:

+--------------+----------------+----------------------+-----------+
| BANK_ID (PK) | BRANCH_ID (PK) |    ACCOUNT_NUM  (PK) |  CURRENCY |
+--------------+----------------+----------------------+-----------+
|           20 |            621 |                 1001 |    ILS    |
|           20 |            623 |                 1002 |    USD    |
|           20 |             90 |                 1003 |    GBP    |
+--------------+----------------+----------------------+-----------+


AMOUNTS:

+-----------------+--------+-----+
| ACCOUNT_REC(PK) | AMOUNT |     |
+-----------------+--------+-----+
|     20 621 1001 |  10000 |     |
|     20 623 1002 |  20000 |     |
|     20 90  1003 |  30000 |     |
+-----------------+--------+-----+


and I want the result to be a simple join between the primary keys (without ACCOUNT_REC), i.e:

+---------+-----------+-------------+----------+--------+
| BANK_ID | BRANCH_ID | ACCOUNT_NUM | CURRENCY | AMOUNT |
+---------+-----------+-------------+----------+--------+
|      20 |       621 |        1001 | ILS      |  10000 |
|      20 |       623 |        1002 | USD      |  20000 |
|      20 |        90 |        1003 | GBP      |  30000 |
+---------+-----------+-------------+----------+--------+


My query is:  

FROM [ACCOUNTS]  
  JOIN  [AMOUNTS]  
  ON (REPLACE( CAST  ([BANK_ID] as  nchar(2)) + ' '
       + CAST  ([BRANCH_ID] as  nchar(3))   + '  '
       + CAST  ([ACCOUNT_NUM] as  nchar(4)) ,' ', '') = REPLACE([ACCOUNT_REC], ' ', ''))


What I made to create a format that suits both tables 
[BANK_ID][BRANCH_ID][ACCOUNT_NUM] with no spaces between 

I want to if there's any way to improve my query and if there's a better approach to this problem?

P.S: I cannot change the table structure
You should probably fire the Database Admin.

But seriously, a problem in your query arises if you have duplicate, but different (bank_id + branch_id)'s. For example, (22 + 202) and (2 + 2202) both equal the same thing.

Change your query to include the space, instead of replacing it on both sides.

Here's a SQL Fiddle demonstrating the issue:
http://sqlfiddle.com/#!18/3a6b9/2

Example query to match exactly, don't remove the spaces (Note won't work on SQL fiddle as I used different lengths for the colunmns):

SELECT BANK_ID, BRANCH_ID, ACCOUNT_NUM, CURRENCY, AMOUNT
FROM [ACCOUNTS]  
  JOIN  [AMOUNTS]  
  ON (
    CAST(
         CAST  ([BANK_ID] as  nchar(2)) + ' '
       + CAST  ([BRANCH_ID] as  nchar(3)) + ' '
       + CAST  ([ACCOUNT_NUM] as  nchar(4)) 
        AS varchar(255)
        ) 
         LIKE
        CAST ([AMOUNTS].[ACCOUNT_REC] AS varchar(255))
     )


Update, since you mentioned more about your schema: 

https://dbfiddle.uk/?rdbms=sqlserver_2017&amp;fiddle=f8c037b9cc9afc2e2de850011031020d

SELECT  * FROM ACCOUNTS JOIN AMOUNTS ON (
         CONCAT(CONVERT(VARCHAR(255), [BANK_ID]), ' ')
       + CONCAT(CONVERT(VARCHAR(255), [BRANCH_ID]), ' ')
       + CONVERT(VARCHAR(255), [ACCOUNT_NUM])
       ) LIKE ([AMOUNTS].[ACCOUNT_REC] )