从各种位置截取字符串的SQL语法
知: 字段A='F:\photo\Winter Leaves.jpg'
要求:分段截取每段字符[字段A不能为TEXT类型,否则报错]
解决方法:
---截取字符串A的第一个\左边的字符串
select left(A,charindex('/',A)-1)
输出结果:F:
---截取\中间的字符串
select left(stuff(A,1,charindex('/',A),''),charindex('/',stuff(A,1,charindex('/',A),''))-1)
输出结果:photo
---截取最后一个\后面的字符串
select reverse(left(reverse(A),charindex('/',reverse(A))-1))
输出结果:Winter Leaves.jpg
---截取字符串A的首字幕
select STUFF(A,1, 1, '')
输出结果::\photo\Winter Leaves.jpg
相关文档:
<%
Dim Fy_Url,Fy_a,Fy_x,Fy_Cs(),Fy_Cl,Fy_Ts,Fy_Zx
'---定义部份 头------
Fy_Cl = 1 '处理方式:1=提示信息,2=转向页面,3=先提示再转向
Fy_Zx = "Error.Asp" '出错时转向的页面
'---定义部份 尾------
On Error Resume Next
Fy_Url=Request.ServerVariables("QUER ......
phpmyadmin 修改执行sql文件大小限制
打开php.ini
post_max_size = 100M ; 表单提交文件大小上限
memory_limit = 128M ; 内存上限
upload_max_filesize = 100M ; 上传文件大小上限
修改以上三项,就可以解决。 但是此时PHPMYADMIN中最大限制:22,528 KB, ......
http://blog.csdn.net/fenglibing/archive/2007/10/24/1841537.aspx
1、将一个表中的内容拷贝到另外一个表中
insert into testT1(a1,b1,c1) select a,b,c from test;
insert into testT select * from test; (前提是兩個表的結構完全相同)
insert into notebook(id,title,content)
se ......
通配符 说明
_ 与任意单字符匹配
% 与包含一个或多个字符的字符串匹配
[ ] 与特定范围(例如,[a-f])或特定集(例如,[abcdef])中的任意单字符匹配。
[^] 与特定范围(例如,[^a-f])或特定集(例如,[^abcdef])之外的任意单字符匹配。 ......
如果temp_t1不存在,
oracle:
create table temp_t1
as
select * from t1
sql server:
select * into temp_t1 from t1
如果temp_t1存在,
oracle:
insert into table temp_t1
select * from t1
sql server:
insert into table temp_t1
select * from t1 ......