Modified areaconfig sql script for distinct the same record