If it's a bigint or similar, then a simple math operation will work.
DECLARE @Table TABLE( Somenumber bigint);
INSERT INTO @Table
SELECT 1000000017777 UNION ALL
SELECT 1000000017342;
SELECT *, Somenumber % 1000000000000
FROM @Table;
Luis C.
General Disclaimer:
Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?
How to post data/code on a forum to get the best help: Option 1 / Option 2