CREATE TABLE [area] (
[id] [int] NOT NULL ,
[name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[Rome] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[sz_code] [nvarchar] (6) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[zm_code] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
CONSTRAINT [PK_area] PRIMARY KEY CLUSTERED
(
[id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
文件说明:
area.sql 创建表 area
area.CSV 数据文件
数据倒入方法:
1.创建了area表后
2.打开企业管理,右键选择area表,在右键菜单里选择 所有任务->导入数据.出现向导提示,点下一步.
3.进入选择数据源菜单,数据源选择为"文本文件",在文件名里选择"area.CSV"文件,点下一步.
4.进入选择文本格式菜单,什么都不管,点下一步.
5.进入指定列分割符选择逗号,点下一步.
6.进入选择目的菜单,选择你的数据库,ok,Next!
7,一路Next,Next...Ok,You are a wise man!
由于某些外在原因程序代码不能Show.So,Sorry,I say only(哇!我简直是个英语天才,~V~)
但是,这里有参考的T-sql:
--------------------------------------------------------------------------------------------
得到省级:Select * FROM area where sz_code like '__0000'
说明:"__"是指语法,没什么好说明的.
--------------------------------------------------------------------------------------------
得到市级:Select * FROM area where sz_code like 'nn__00'
说明:"nn"是指城市的所属省份的sz_code字段值的前两位.例如山东省sz_code是:370000,则它的所属城市的查询语句是:Select * FROM area where sz_code like '37__00',可以去式下.所以我们在程序中只需要把370000处理下得到37就ok,完全的字符串操作.
--------------------------------------------------------------------------------------------
得到乡镇:Select * FROM area where sz_code like 'nnnn__'
说明:从上面就不难理解这个了"nnnn"是指乡镇所属城市的sz_code字段值的前四位.例如临沂的sz_code是:371300,则它的所属城市的查询语句是:Select * FROM area where sz_code like '3713__',所以我们在程序中只需要把371300处理下得到3713就ok,完全的字符串操作.
由于原来的数据导入出现错误,感谢:vagerent 的建议,现在提供access数据文档
有问题请联系:QQ:357128859(独木桥遇狗熊)
分享到:
相关推荐
第3章 导线的建模与分析 3.1 几何属性与电子属性 3.2 导线的电子模型 3.3 简单传输线 3.4 特殊的传输线 3.5 导线成本模型 3.6 测量方法 3.7 一些实验测量 3.8 目录说明 3.9 习题 第4章 电路 4.1 MOS晶体管 4.2 寄生...
1. Location (位置): 描述一个地方的位置时,我们可以使用“be located in/lie in”结构,例如:“Our city is located in the southern part of China.”此外,还可以用"stand"来描绘重要的地标,如:“There ...
/*********************** (C) ... Rewrite the different part of code into its C file. 2. Drive TIM3 output PWM wave successfully. 3. Add "servo" file, for servo control. 2010-08-19(update to v2.4...
It will serve as a source of up-to-date research in this continuously developing area. The book also provides an opportunity for researchers to explore the use of advanced computing technologies and ...
25. Routers process network, link and physical layers (layers 1 through 3). (This is a little bit of a white lie, as modern routers sometimes act as firewalls or caching components, and process ...
This implies that it could be part of a series offering English introductions to various tourist attractions across China. These guides serve to enhance the quality of tourism services and aid ...
#### Unit 5 Knowing about China **Topic 1: How much do you know about China?** 在这个单元里,学生将学习到关于中国的文化、地理以及一些基本的历史知识。通过这些知识点的学习,学生们能够更好地了解中国,...
area has been likely part of the northern Tianshan-Junggar block since the Late Devonian,although it may have been part of the Central Tianshan tectonostratigraphic province priorto the Late Devonian....
- Zhalong Nature Reserve is in the northeastern part of Heilongjiang Province, China. 2. 该地区为大量野生生物提供食物和栖息地。- The area provides food and habitats for a large amount of wildlife. 3. ...
9.2.4 Proof of the Nonrandom Part of (9. 2. 13) for j=l, 238 Contents 9.3 Convergence of the Process Mn-EMn 239 9.3.1 Finite-Dimensional Convergence of Mn-EMn 239 9.3.2 Limit of S1 242 9.3.3 ...
- "I'm originally from Beijing, China, a city rich in history and culture. Growing up there has given me a deep appreciation for both traditional and modern values." #### 二、关于教育背景的问题 **4...