shp 文件导出sql或导入postgis
1.直接导入数据库
shp2pgsql -s "4326" -W "GBK" E:\shape\Road_polyline.shp
road_cross| psql -U postgres -h 172.17.40.83 -d test
2.导出sql
shp2pgsql -s "4326" E:\shape\Road_polyline.shp blocks >
E:\roadcross\blocks.sql
3.导出sql再导入数据库
1.shp2pgsql -s "4326" -W "GBK" E:\shape\Road_polyline.shp blocks
> E:\roadcross\blocks.sql
2.psql -U postgres -h 172.17.40.83 -d test -f
E:\roadcross\blocks.sql
相关文档:
例子: int id = Convert.ToInt32(replace((Request.QueryString["id"]), ""));
public static string replace(string str, string str2)
{
str = str.Replace(";", str2);
str = ......
Sql Server 查询sql执行各个阶段的时间
set statistics io on
set statistics time on
set statistics profile on
go
[你的sql语句]
go
set statistics io off
set statistics time off
set statistics profile off
我运行:
set statistics io on
set statistics time on
set statistics profile on ......
做项目里面的数据库设计了两个类型放一个字段里面,我又要通过分开的类型来进行查询,痛苦啊,
两种方法;
1,读取到缓存中自定义datatable, 代码就不贴了.
不欣赏这种做法,因为我已经把页面上很多东西写了,都是有的Sql语句,这样改一下都要改了.
2.直接在Sql里面建视图,
l用SUBSTRING(dbo.K_ProductDtl.Caizhi, 0, CH ......
http://www.cnblogs.com/Mainz/archive/2008/12/20/1358897.html
什么情况下使用表变量?什么情况下使用临时表?
表变量:
DECLARE @tb table(id int identity(1,1), name varchar(100))
INSERT @tb
SELECT id, name
from mytable
WHERE name like ‘zhang%&rsquo ......