Monday, September 19, 2011

Work with Spatial data in SQL Server 2008-R2

1. Download SqlSpatialTools software

2. Download Spatial type of data

3. Extract SqlSpatialTools software

4. Extract Spatial type of data

5. Run Shape2Sql.exe

6. Add Server Name

7. Add DB name (where you want to upload)

8. Add Spatial type of file (.shp)

9. Click on OK button

10. Enter the table name

11. Click on Upload to Database button

12. Select the Database

13. Write the command

SELECT * FROM DBO.INDIA_DS
WHERE STATE LIKE 'BIHAR%'
OR STATE LIKE 'HIMA%'
OR STATE LIKE 'KARN%'
OR STATE LIKE 'RAJ%'
OR STATE LIKE 'ARU%'
ORDER BY STATE