注册 登录
编程论坛 SQL Server论坛

charindex, substr 想了很久不懂要怎么连接

derrick_goi 发布于 2011-10-11 14:21, 545 次点击
Stockitem                  Width
M185/1500                   1500



我能不能连接 stockitem 后面的 1500 和 width的1500 一起?

条件是, 只有stockitem 后面那个1500 和 width的1500 匹配了才出来, 是不是要用charindex, substr 来实现
1 回复
#2
scilent2011-10-12 19:52
不懂你说的连接是什么意思
select stockitem+width as 连接后列名 from 表名 where width$stockitem
1