Myth of Cambodia Geography Identification Code
How many of you are familiar with Cambodia Geography Identification code. Do you know the myth behind it code assignment? Well, it’s all started like this:
- There are 4 levels of administration
- Province
- District
- Commune
- Village
- Commune
- District
- Province
- Each level add up 2 digits begin with Province 2 digits
- Identification code are stored in numberic form (Integer)
That mean valid village code length bewteen 7 and 8 for example code 24020406 would identified as:
- Village Name = Ou Ressey Loeu (24020406)
- In Commune = Ou Andoung (240204)
- In District = Sala Krau (2402)
- In Province = Pailin (24)
Now suppose these Geography represent in 4 separate tables (SQL Server for ghost shack!)

By knowing a village code (eg: 24020406) I want to extract province code and I want the quickest way possible any thought? Oh ! there will be a reward for best answer.

Chorn Sokun
October 2, 2009 at 9:17 am