As your approach to compare these values is not a numerical one, but rather character based, the easiest would be to compare just A.Col1 with a snippet of the same length cut from the beginning of B.Col1.
Try this:
DECLARE @tblA TABLE(Col1 BIGINT);
DECLARE @tblB TABLE(Col1 BIGINT);
INSERT INTO @tblA VALUES(123),(1234),(12345);
INSERT INTO @tblB VALUES(12300),(12340000),(1345);
SELECT A.Col1
,B.Col1
,LEN(A.Col1)
,CASE WHEN A.Col1=LEFT(B.Col1,LEN(A.Col1)) THEN 'Start with the same digits' ELSE '' END
FROM @tblA AS A
CROSS JOIN @tblB AS B
The result
+----------+----------+--------------------+----------------------------+
| Col1 | Col1 | (Kein Spaltenname) | (Kein Spaltenname) |
+----------+----------+--------------------+----------------------------+
| 123 | 12300 | 3 | Start with the same digits |
+----------+----------+--------------------+----------------------------+
| 1234 | 12300 | 4 | |
+----------+----------+--------------------+----------------------------+
| 12345000 | 12300 | 8 | |
+----------+----------+--------------------+----------------------------+
| 123 | 12340000 | 3 | Start with the same digits |
+----------+----------+--------------------+----------------------------+
| 1234 | 12340000 | 4 | Start with the same digits |
+----------+----------+--------------------+----------------------------+
| 12345000 | 12340000 | 8 | |
+----------+----------+--------------------+----------------------------+
| 123 | 1345 | 3 | |
+----------+----------+--------------------+----------------------------+
| 1234 | 1345 | 4 | |
+----------+----------+--------------------+----------------------------+
| 12345000 | 1345 | 8 | |
+----------+----------+--------------------+----------------------------+
UPDATE
A CROSS JOIN with millions of rows in both tables is no good idea. This was just to illustrate the approach. You might use an INNER JOIN and put this code as the join's condition:
SELECT A.Col1
,B.Col1
,LEN(A.Col1)
,CASE WHEN A.Col1=LEFT(B.Col1,LEN(A.Col1)) THEN 'Start with the same digits' ELSE '' END
FROM @tblA AS A
INNER JOIN @tblB AS B ON A.Col1=LEFT(B.Col1,LEN(A.Col1))
^(\d+)[ ]\1to select.