I am working with SQL Server 2014.

I have a data-set with company names that are sometimes truncated due to space limitations at source. `E.g. AAA PTY Ltd` would sometimes appear as `'AAA PTY L'` and sometimes as the original non truncated name depending on the source. I need to replace the truncated values with the long ones where it is truncated to avoid duplicate records when matching with other data-sets. Replacing the full names with the truncated ones is easy but I need it the other way round. 

I created a table with the long names and the truncated ones, ordered it descending (so the long name always appear before the truncated ones) and add a column for the truncated names (mimic the truncation where the full name was not truncated). I also created a flag to indicate if it was truncated so I can easily identify the records I need to update. 
So the table I created looks like this:

```
|Id | FullName     | Truncated name | TruncFlag|
+---+--------------+----------------+----------+
|1  | AAA PTY Ltd  | AAA PTY L      | 1        |
|2  | AAA PTY L    | AAA PTY L      | 0        |
|3  | BBB PTY Ltd  | BBB PTY L      | 1        |
|4  | BBB PTY L    | BBB PTY L      | 0        |

```

I need to replace the full name in the second and fourth rows with the full name in the first and third rows respectively. 

I tried to do that with `JOINS` (subqueries counting the number of full names per truncated name having count > 1) and also with while loops, storing the truncated and full names in variables, but it's beyond my capability.

I would like to get to a table like (after updating FullNames in second and fourth rows):

```
|Id | FullName     | Truncated name | TruncFlag|
+---+--------------+----------------+----------+
|1  | AAA PTY Ltd  | AAA PTY L      | 1        |
|2  | AAA PTY Ltd  | AAA PTY L      | 0        |
|3  | BBB PTY Ltd  | BBB PTY L      | 1        |
|4  | BBB PTY Ltd  | BBB PTY L      | 0        |

```