SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N103048' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020857'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N103050' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020858'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N103047' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020856'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N97138'  AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020843'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N103009' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020845'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N103010' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020846'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N103014' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020847'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N103018' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020848'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N103019' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020849'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N103021' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020850'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N103023' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020852'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N103022' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020851'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N103024' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020853'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N103025' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020854'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N103026' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020855'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N103443' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020862'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N103442' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020861'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N103425' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020860'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N103053' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0220859'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N100787' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020841'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N101549' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020842'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N102013' AND id_dokumen_register = '2014.022702' AND id_dokumen_terima = '2014.0020822'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N104796' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020884'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N104797' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020885'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N104805' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020889'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N104748' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020878'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N104806' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020890'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N104801' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020887'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N104804' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020888'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N104799' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020886'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N104794' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020882'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N102517' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020872'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N102516' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020871'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N104780' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020879'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N104782' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020881'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N104729' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020876'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N102541' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020873'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N104781' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020880'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N102552' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020874'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N102557' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020875'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N104808' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020892'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N102012' AND id_dokumen_register = '2014.022700' AND id_dokumen_terima = '2014.0020893'
SELECT * FROM dbo.dokumen_terima WHERE no_referensi = 'N102017' AND id_dokumen_register = '2014.022700' AND id_dokumen_terima = '2014.0020894'

----------------

--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N103048' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020857'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N103050' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020858'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N103047' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020856'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N97138'  AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020843'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N103009' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020845'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N103010' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020846'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N103014' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020847'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N103018' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020848'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N103019' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020849'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N103021' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020850'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N103023' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020852'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N103022' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020851'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N103024' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020853'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N103025' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020854'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N103026' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020855'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N103443' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020862'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N103442' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020861'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N103425' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020860'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N103053' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0220859'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N100787' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020841'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N101549' AND id_dokumen_register = '2014.022697' AND id_dokumen_terima = '2014.0020842'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N102013' AND id_dokumen_register = '2014.022702' AND id_dokumen_terima = '2014.0020822'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N104796' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020884'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N104797' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020885'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N104805' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020889'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N104748' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020878'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N104806' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020890'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N104801' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020887'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N104804' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020888'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N104799' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020886'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N104794' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020882'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N102517' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020872'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N102516' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020871'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N104780' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020879'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N104782' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020881'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N104729' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020876'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N102541' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020873'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N104781' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020880'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N102552' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020874'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N102557' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020875'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N104808' AND id_dokumen_register = '2014.022595' AND id_dokumen_terima = '2014.0020892'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N102012' AND id_dokumen_register = '2014.022700' AND id_dokumen_terima = '2014.0020893'
--UPDATE dbo.dokumen_terima SET status = 'G' WHERE no_referensi = 'N102017' AND id_dokumen_register = '2014.022700' AND id_dokumen_terima = '2014.0020894'
