GVKun编程网logo

使用 Max 时 oracle 缺少表达式(oracle报错缺失表达式)

1

以上就是给各位分享使用Max时oracle缺少表达式,其中也会对oracle报错缺失表达式进行解释,同时本文还将给你拓展不设置最大日期角度js、@size(max=value)和@min(value)

以上就是给各位分享使用 Max 时 oracle 缺少表达式,其中也会对oracle报错缺失表达式进行解释,同时本文还将给你拓展 不设置最大日期角度js、@size(max = value)和@min(value)@max(value)之间的差异、CSS:将 max-height 设置为与“none” max-height 时的高度相同的值?、HDU3415 Max Sum of Max-K-sub-sequence【最大子段和 + 前缀和 + 单调队列】等相关知识,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

本文目录一览:

使用 Max 时 oracle 缺少表达式(oracle报错缺失表达式)

使用 Max 时 oracle 缺少表达式(oracle报错缺失表达式)

如何解决使用 Max 时 oracle 缺少表达式

该项目需要收集过去 27 个月的数据,这将满足 2 个条件:

3个月(今年)+12年(上年)+12年(上年) 1个月(今年)+12年(上年)+12年(上年)+2(前3年)或2个月(今年)+12年(上年)+12年(上年)+ 1(前3年) 我需要在名为“日期条件”的数据中添加一个条件/列,对于条件 1,只显示今年和上一年的数据 (3 + 12 + 12) 个月,对于条件 2,显示今年和上一年以及上一个年的数据(1/2 + 12 + 12 + 1/2)个月。

这个条件曾经在tableau中作为一个计算字段,但是性能太慢,所以想在数据层面进行过滤。我写了如下代码但收到错误 936:缺少表达式

  1. SELECT * FROM DDS_MQC_QAP_VW
  2. WHERE (INSP_YEAR IS NULL
  3. AND INSP_RESULT_REASON_DESC NOT LIKE ''%On hold%''
  4. AND INSP_RESULT_REASON_DESC NOT LIKE ''%Aborted%''
  5. )
  6. OR
  7. (
  8. (
  9. inspection_DATE BETWEEN
  10. ADD_MONTHS(LAST_DAY(
  11. ADD_MONTHS( (SELECT MAX(inspection_DATE) AS MAX_DATE FROM DDS_MQC_QAP_VW) -26,))+1,-1)
  12. AND (SELECT MAX(inspection_DATE) AS MAX_DATE FROM DDS_MQC_QAP_VW)
  13. )
  14. AND INSP_RESULT_REASON_DESC NOT LIKE ''%On hold%''
  15. AND INSP_RESULT_REASON_DESC NOT LIKE ''%Aborted%''
  16. )

相关资料:

enter image description here

解决方法

将逗号移到另一个位置:

  1. ADD_MONTHS( (SELECT MAX(INSPECTION_DATE) AS MAX_DATE FROM DDS_MQC_QAP_VW) -26,))+1,-1)
  2. ^
  3. here
  4. ADD_MONTHS( (SELECT MAX(INSPECTION_DATE) AS MAX_DATE FROM DDS_MQC_QAP_VW),-26))+1,-1)

不设置最大日期角度js" alt=" 不设置最大日期角度js">

不设置最大日期角度js"> 不设置最大日期角度js

如何解决<input type="date" max="{{max}}"> 不设置最大日期角度js

我有以下 HTML 代码

  1. <input class="col-5" type="date"
  2. max="{{ vm.maxDate | date: ''yyyy-MM-dd'' }}"
  3. min="{{ vm.minDate | date: ''yyyy-MM-dd'' }}"
  4. ng-model="vm.endBy">

以下是控制器中的angular js代码

  1. vm.minDate = new Date(moment.utc().format(dateFormat));
  2. vm.maxDate = new Date(moment.utc().format(dateFormat));
  3. vm.endBy = new Date(moment.utc().format(dateFormat));
  4. vm.maxDate.setDate(vm.minDate.getDate()+ 185);
  5. vm.endBy.setDate(vm.minDate.getDate() + 185);

现在我的日历一直显示到 maxDate,日期选择为 maxdate 但是当我提交表单时,它显示为未定义。我也尝试在 HTML 中打印 endBy,但它没有显示 maxDate。但是,对于早于 maxDate 的所有其他日期,它工作正常。

我不知道这有什么问题。有谁知道它为什么会这样?最大验证是否不检查是否相等,为什么在我提交时在输入框中设置了 endBy 日期,但它显示未定义?

解决方法

您创建的日期无效

  1. new Date(moment.utc().format( ''yyyy-MM-dd''));

试试

  1. vm.minDate = new Date();
  2. vm.maxDate = new Date();
  3. vm.endBy = new Date();

@size(max = value)和@min(value)@max(value)之间的差异

@size(max = value)和@min(value)@max(value)之间的差异

我想做一些域验证

在我的对象中,我有一个整数,

现在我的问题是我是否写

@Min(SEQ_MIN_VALUE)@Max(SEQ_MAX_VALUE)private Integer sequence;

 @Size(min = 1, max = NAME_MAX_LENGTH) private Integer sequence;

如果是整数,则哪一个适合域验证。

有人可以解释一下两者之间的区别吗?

谢谢。

答案1

小编典典

@Min@Max用于验证数字字段,其可以被String(代表数字), ,,int 等和它们各自的原始包装。short``byte

@Size 用于检查字段的长度约束。

按照文档@Size的支持StringCollectionMaparrays@Min@Max支持原语及其包装。请参阅文档。

CSS:将 max-height 设置为与“none” max-height 时的高度相同的值?

CSS:将 max-height 设置为与“none” max-height 时的高度相同的值?

如何解决CSS:将 max-height 设置为与“none” max-height 时的高度相同的值?

所以我正在制作一个使用 max-height 和 opacity 转换的下拉菜单,例如,如果下拉菜单的高度为 500 像素,我将在打开时使用 500px 作为最大高度,在关闭时使用 0。但是,我的下拉列表的高度是自动计算的。我需要将 max-height 设置为此自动计算的高度,以便过渡具有正确的时间。否则,如果我使用更大的 max-height 值,则在关闭时下拉菜单不会移动,直到 max-height 转变为低于真实值,然后在剩余时间内突然移动得更快。有什么办法吗?

解决方法

于是我找到了解决办法。我只是在触发关闭下拉菜单之前将 maxHeight 设置为 offsetHeight

我还需要使用 0 毫秒的 setTimeout 来触发关闭它,但在运行以下函数后。

export function retreatDropdown(e: HTMLElement) {
  e.style.maxHeight = `${e.offsetHeight}px`;
}

我可以为打开动画做一个类似的技巧,但在打开之前你不会知道正确的 maxHeight,所以我猜这更棘手(但不如关闭动画 IMO 重要)。>

编辑:关闭/打开下拉菜单的完整(TypeScript)解决方案

const defaultTransitionTime = 200;

export function toggleDropdown(
  e: HTMLElement,value: boolean = null,toggleAction: () => void = null // Function that toggles true/false for accordion open
) {
  if (value) {
    openDropdown(e,toggleAction);
  } else {
    retreatDropdown(e,toggleAction);
  }
}

export function openDropdown(
  e: HTMLElement,openAction: () => void = null
) {
  if (openAction) setTimeout(() => openAction(),0);
  e.style.display = "block";
  setTimeout(() => {
    const offsetHeight = e.offsetHeight;
    e.style.maxHeight = "0px";
    setTimeout(() => {
      e.style.maxHeight = `${offsetHeight}px`;
    },5);
  },5);
  setTimeout(() => {
    e.style.maxHeight = "none";
  },defaultTransitionTime);
}

export function retreatDropdown(
  e: HTMLElement,closeAction: () => void = null
) {
  e.style.maxHeight = `${e.offsetHeight}px`;
  if (closeAction) setTimeout(() => closeAction(),0);
}

下拉CSS类:

.dropdown {
  transition: opacity 200ms linear,max-height 200ms linear;
  will-change: opacity,max-height;
}

Angular ngStyle(应用于手风琴的打开/关闭):

elementStyle(e: HTMLElement) {
    return this.isOpen(HTMLElement) // I use a map of booleans for open state here...
      ? { display: "block","max-height": "none" }
      : { "max-height": 0,opacity: 0 };
  }

HDU3415 Max Sum of Max-K-sub-sequence【最大子段和 + 前缀和 + 单调队列】

HDU3415 Max Sum of Max-K-sub-sequence【最大子段和 + 前缀和 + 单调队列】

Max Sum of Max-K-sub-sequence

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 10831 Accepted Submission(s): 3970

Problem Description
Given a circle sequence A[1],A[2],A[3]…A[n]. Circle sequence means the left neighbour of A[1] is A[n] , and the right neighbour of A[n] is A[1].
Now your job is to calculate the max sum of a Max-K-sub-sequence. Max-K-sub-sequence means a continuous non-empty sub-sequence which length not exceed K.

Input
The first line of the input contains an integer T(1<=T<=100) which means the number of test cases.
Then T lines follow, each line starts with two integers N , K(1<=N<=100000 , 1<=K<=N), then N integers followed(all the integers are between -1000 and 1000).

Output
For each test case, you should output a line contains three integers, the Max Sum in the sequence, the start position of the sub-sequence, the end position of the sub-sequence. If there are more than one result, output the minimum start position, if still more than one , output the minimum length of them.

Sample Input
4
6 3
6 -1 2 -6 5 -5
6 4
6 -1 2 -6 5 -5
6 3
-1 2 -6 5 -5 6
6 6
-1 -1 -1 -1 -1 -1








Sample Output
7 1 3
7 1 3
7 6 2
-1 1 1



问题链接:HDU3415 Max Sum of Max-K-sub-sequence
问题简述:给定长度为 n 的循环序列,计算长度不超过 k 的子序列其和为最大。
问题分析:给代码不解释。
程序说明:(略)
参考链接:(略)
题记:(略)




AC 的 C++ 语言程序如下:

/* HDU3415 Max Sum of Max-K-sub-sequence */

#include <bits/stdc++.h>

using namespace std;

const int INF = 0x7F7F7F7F;
const int N = 100000;
int a[N * 2 + 1], q[N * 2 + 1];

int main()
{
    int t, n, k;
    scanf("%d", &t);
    while(t--) {
        scanf("%d%d", &n, &k);
        a[0] = 0;
        for(int i = 1; i <= n; i++) {
            scanf("%d", &a[i]);
            a[i] += a[i - 1];       // 计算前缀和
        }
        a[n + 1] = 0;
        for(int i = n + 1; i < n + k; i++)
            a[i] = a[n] + a[i - n];     // a[n + i] = a[i] + a[n],i=1...k

        int end = n + k - 1, head = 0, tail = 0, maxSum = -INF, l, r;
        for(int i = 1; i <= end ; i++) {
            while(head < tail && a[i - 1] < a[q[tail - 1]]) tail--;
            q[tail++] = i - 1;
            while(head < tail && i - q[head] > k) head++;
            if(maxSum < a[i] - a[q[head]]) {
                maxSum = a[i] - a[q[head]];
                l = q[head] + 1;
                r = i > n ? i % n : i;
            }
        }

        printf("%d %d %d\n", maxSum, l, r);
    }

    return 0;
}
  • 点赞
  • 收藏
  • 分享
    • 文章举报
海岛 Blog
发布了 2264 篇原创文章 · 获赞 2371 · 访问量 264 万 +
他的留言板 关注

今天关于使用 Max 时 oracle 缺少表达式oracle报错缺失表达式的讲解已经结束,谢谢您的阅读,如果想了解更多关于 不设置最大日期角度js、@size(max = value)和@min(value)@max(value)之间的差异、CSS:将 max-height 设置为与“none” max-height 时的高度相同的值?、HDU3415 Max Sum of Max-K-sub-sequence【最大子段和 + 前缀和 + 单调队列】的相关知识,请在本站搜索。

本文标签: