IF('111' IS NOT NULL){
IF(strV = 「1」 )
{
strV LIKE SUBSTR( strV ,1,1) +’%’
}
ELSE IF(strV = 「1」 )
{
strV LIKE SUBSTR(strV ,1,1) +’%’
}
}以上这段逻辑,写在sql的where部分,怎么写,我试着写了一下,碰到两个问题:第一、case '111' when is not null....或者case '111' when not null都会说is not null语法不对。第二、SUBSTR('111',1,1) +’%’ 这样他不认识百分号,应该怎么写哪位高手帮我完整的翻译一下,谢谢
IF(strV = 「1」 )
{
strV LIKE SUBSTR( strV ,1,1) +’%’
}
ELSE IF(strV = 「1」 )
{
strV LIKE SUBSTR(strV ,1,1) +’%’
}
}以上这段逻辑,写在sql的where部分,怎么写,我试着写了一下,碰到两个问题:第一、case '111' when is not null....或者case '111' when not null都会说is not null语法不对。第二、SUBSTR('111',1,1) +’%’ 这样他不认识百分号,应该怎么写哪位高手帮我完整的翻译一下,谢谢
解决方案 »
- pl/sqlorcle过程调试CLOB参数输入问题
- 公司改用DB2,让我情何以堪
- java频繁调用oracle存储过程返回游标问题,急!
- 请问 ,如何在不同用户间导数据结构
- 请问如何完全删除Oracle 8.0.6
- 数据库查询时,如果表内有a1,a2,a3...到a12的字段,在查询时我可不可以写成"select a1~a12 "?
- 初级问题:如何从一个表空间切换到另外一个表空间?如何直接访问另外一个表空间的表?
- 分区键是不是必须要写成固定格式的呢?
- 优化、快速查询!!!
- 把一千万的数据按照出口时间分别放到月表里面
- 关于分区表查询的问题!高手请进。
- 怎样在一个树型目录里插入另一个目录?代码怎样实现?
8i不支持case when。
比如select 1 from dual where ('123' is null and 1=1) or ('123' is not null and 1<>1)
2.SUBSTR('111',1,1) || '%'