Magento Forum

   
SQL Query to insert State/Region for India
 
Manoj Yadav
Jr. Member
 
Total Posts:  1
Joined:  2009-11-18
 

Hi,

I have written SQL query to insert State/Region for India and thought to share this.
so here is the SQL

INSERT INTO `directory_country_regionVALUES
(NULL "IN""Andaman Nicobar","Andaman Nicobar"),
(
NULL "IN""Andhra Pradesh","Andhra Pradesh"),
(
NULL "IN""Arunachal Pradesh","Arunachal Pradesh"),
(
NULL "IN""Assam","Assam"),
(
NULL "IN""Bihar","Bihar"),
(
NULL "IN""Chandigarh","Chandigarh"),
(
NULL "IN""Chhattisgarh","Chhattisgarh"),
(
NULL "IN""Dadra Nagar Haveli","Dadra Nagar Haveli"),
(
NULL "IN""Daman Diu","Daman Diu"),
(
NULL "IN""Delhi","Delhi"),
(
NULL "IN""Goa","Goa"),
(
NULL "IN""Gujarat","Gujarat"),
(
NULL "IN""Haryana","Haryana"),
(
NULL "IN""Himachal Pradesh","Himachal Pradesh"),
(
NULL "IN""Jammu Kashmir","Jammu Kashmir"),
(
NULL "IN""Jharkhand","Jharkhand"),
(
NULL "IN""Karnataka","Karnataka"),
(
NULL "IN""Kerala","Kerala"),
(
NULL "IN""Lakshadweep","Lakshadweep"),
(
NULL "IN""Madhya Pradesh","Madhya Pradesh"),
(
NULL "IN""Maharashtra","Maharashtra"),
(
NULL "IN""Manipur","Manipur"),
(
NULL "IN""Meghalaya","Meghalaya"),
(
NULL "IN""Mizoram","Mizoram"),
(
NULL "IN""Nagaland","Nagaland"),
(
NULL "IN""Orissa","Orissa"),
(
NULL "IN""Pondicherry","Pondicherry"),
(
NULL "IN""Punjab","Punjab"),
(
NULL "IN""Rajasthan","Rajasthan"),
(
NULL "IN""Sikkim","Sikkim"),
(
NULL "IN""Tamil Nadu","Tamil Nadu"),
(
NULL "IN""Tripura","Tripura"),
(
NULL "IN""Uttar Pradesh","Uttar Pradesh"),
(
NULL "IN""Uttaranchal","Uttaranchal"),
(
NULL "IN""West Bengal","West Bengal");

INSERT INTO `directory_country_region_name` (`locale` ,`region_id` ,`name` ) SELECT 'en_US'tmp.region_idtmp.default_name FROM `directory_country_region` AS tmp WHERE tmp.country_id='IN';

File Attachments
states.sql  (File Size: 2KB - Downloads: 358)
 
Magento Community Magento Community
Magento Community
Magento Community
 
pragneshkaria
Jr. Member
 
Avatar
Total Posts:  5
Joined:  2009-11-17
Mumbai
 

Thanks…

 
Magento Community Magento Community
Magento Community
Magento Community
 
bolizet
Member
 
Avatar
Total Posts:  31
Joined:  2010-01-05
 

Ох набралось вас тут, индусов… печально…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ravindra Bhosale
Jr. Member
 
Total Posts:  1
Joined:  2010-01-11
 

You are done great job for Magento Indian developer.

 
Magento Community Magento Community
Magento Community
Magento Community
 
seravishankar
Jr. Member
 
Total Posts:  3
Joined:  2011-01-16
 

thank it working fine

 
Magento Community Magento Community
Magento Community
Magento Community
 
sabdul
Jr. Member
 
Total Posts:  5
Joined:  2010-06-10
 

Thanks Manoj its work fine.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sourav the inventer
Jr. Member
 
Avatar
Total Posts:  27
Joined:  2010-06-11
India, Westbengal, Kolkata
 

Insert the attached sql and it will work

File Attachments
india_state.sql  (File Size: 2KB - Downloads: 403)
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top