查找字符串的语句 字符串:字段(A)1A00-DA001-05501B001-DA002-0558请问如何可以查出第二个 "-"后四位字符串 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select substring(substring(a,charindex('-',a,1)),1,charindex('-',substring(a,charindex('-',a,1)))) -1 ) from table select reverse(left(reverse(a),charindex('-',reverse(a))-1)) from tb create table tb(a varchar(20))insert into tb values('1A00-DA001-0550') insert into tb values('1B001-DA002-0558')select reverse(left(reverse(a),charindex('-',reverse(a))-1)) from tbdrop table tb/*-------------------- 05500558(所影响的行数为 2 行)*/ SELECT REVERSE(STUFF(REVERSE(A),CHARINDEX('-',REVERSE(A)),LEN(A),'')) 问一个表的设计问题(急) 运行查询分析器的问题 有没有办法得到作业上一次正确运行的结果时间呢? 在sqlserver2005里,可以用Java吗? 请教 - select与update的效率问题 时间戳与时间、长整形的转换? 求教问题!!!(在线) 请熟悉SQL的朋友进来看看. 逻辑有点复杂。谢谢! [求助]在存储过程中可否根据变量的值动态指定某一查询条件是否起作用? 这样的存储过程怎么写?在线等!来者有分!!1 这句SQL语句哪里有错啊? 不开放1433端口如何连接SQL
insert into tb values('1A00-DA001-0550')
insert into tb values('1B001-DA002-0558')select reverse(left(reverse(a),charindex('-',reverse(a))-1)) from tbdrop table tb/*
--------------------
0550
0558(所影响的行数为 2 行)
*/