小编Nav*_*abu的帖子

终止宏从进一步执行验证

我有一个method-A()从多种方法调用,

在方法A的条件下,我必须终止宏.

我看到一个选项,Exit sub但这将退出当前sub ie:method-A(),剩下的程序继续.

如何处理这个.

Sub mainMethod()
    method-A()
end Sub

Sub method-A()
    if (true) Then
         'Terminate the macro. that is exit method-A() and also mainMethod()
end Sub
Run Code Online (Sandbox Code Playgroud)

excel vba excel-vba

16
推荐指数
1
解决办法
8万
查看次数

oracle中select中的序列和大小写

我正在尝试执行此查询(在oracle中),但我遇到了一些问题:

SELECT CASE 
         WHEN deptno = '10' THEN scott.seq.nextval 
                                  || 'next10' 
         WHEN deptno = '20' THEN scott.seqnextval 
                                  || 'next20' 
         WHEN deptno = '30' THEN scott.seq.currval 
                                  || 'curr' 
       END col_1 
FROM   scott.emp; 
Run Code Online (Sandbox Code Playgroud)

我得到了这个结果:

COL_1
----------------------------------------------
191next20
192curr
193curr
194next20
195curr
196curr
197next10
198next20
199next10
200curr
201next20
202curr
203next20
204next10
205next20
206next10
207next10

这就是我认为它们应该是:

COL_1
----------------------------------------------
191next20
192curr
193curr
194next20
194curr
194curr
197next10
198next20
199next10
199curr
201next20
201curr
203next20
204next10
205next20
206next10
207next10

那么,为什么我在得到当前值时获得序列的下一个值,而不仅仅是当案例选择下一个值时?是的,这可以用plsql脚本完成,但我不能.

谢谢!

oracle select sequence

5
推荐指数
2
解决办法
4781
查看次数

代码如何工作 - "SWT.MULTI | SWT.SINGLE"应用于样式时

这是我看到一段时间的代码.我想知道代码是如何工作的.

public static final int MULTI = 1 << 1;
public static final int SINGLE = 1 << 2;
public static final int READ_ONLY = 1 << 3;
SWT.MULTI | SWT.SINGLE | SWT.READ_ONLY
Run Code Online (Sandbox Code Playgroud)

我深入研究TableViewer(Composite parent, int style)了寻找答案的课程实施,但没有找到太多.

我找到了这段代码,但并不太了解

static int checkBits (int style, int int0, int int1, int int2, int int3, int int4, int int5) {
int mask = int0 | int1 | int2 | int3 | int4 | int5;
if ((style & mask) == 0) style |= …
Run Code Online (Sandbox Code Playgroud)

java swt operators

1
推荐指数
1
解决办法
828
查看次数

标签 统计

excel ×1

excel-vba ×1

java ×1

operators ×1

oracle ×1

select ×1

sequence ×1

swt ×1

vba ×1