If Value Exists Then Query Else Allow Create New in Oracle Forms An Example
KEY-NEXT-ITEM trigger code
v_empid employees.employee_id%type;
Begin
Select employee_id into v_empid
from hr.employees
where employee_id = :employees.employee_id;
-- value exists
-- set block property and execute query
clear_block(no_validate);
set_block_property('employees', default_where, 'employee_id = '||v_empid);
execute_query;
set_block_property('employees', default_where, '');
next_item;
exception
when no_data_found then
-- when not then clear block and allow to add new
v_empid := :employees.employee_id;
clear_block(no_validate);
:employees.employee_id := v_empid;
next_item;
End;

If Value Exists Then Query Else Allow Create New in Oracle Forms An Example的更多相关文章
- Learn How To Create Trigger In Oracle Forms
I have written many posts related to triggers in Oracle Forms, I have given examples for Form Level ...
- Create Data Block Based On From Clause Query In Oracle Forms
Example is given below to create a data block based on From Clause query in Oracle Forms. The follow ...
- Enter Query Mode Search Tricks Using Enter_Query Built-in in Oracle Forms
In this post you will learn how to specify any condition in enter query mode of Oracle Forms. Whenev ...
- Map Columns From Different Tables and Create Insert and Update Statements in Oracle Forms
This is one of my most needed tool to create Insert and Update statements using select or alias from ...
- Create Timer Example To Show Image Presentation in Oracle Forms
Suppose you want to change multiple images after a specified time in home screen of your oracle form ...
- Freebie - Utility Form: Generate Excel Report From SQL Query In Oracle Forms 6i And 11g
Sharing a form to generate Excel file report from SQL query in Oracle Forms. This form can be used i ...
- Create Custom Modal Dialog Windows For User Input In Oracle Forms
An example is given below to how to create a modal dialog window in Oracle Forms for asking user inp ...
- Create Stacked Canvas to Scroll Horizontal Tabular Data Blocks In Oracle Forms
In this tutorial you will learn to create horizontal scrollable tabular or detail data block by usin ...
- [Oracle] - Create DB on Oracle 12c for an Application
Let's say we are going to develop a application for a bank, or any other enterprise, this applicatio ...
随机推荐
- Azure Active Directory中的特权身份管理如何运作?
[TechTarget中国原创] 用户权限不是平等的.有些用户需要有大量权利和特权——通常这些都是管理员.企业在允许特权用户进行管理以及支持活动时,还需要意识到特权用户也有可能犯错.他们会犯错.他们可 ...
- MYSQL学习心得(转)
适合有SQL SERVER或ORACLE基础的人看,有对比,学习更有效果 转自:http://www.cnblogs.com/lyhabc/ 我的MYSQL学习心得(一) 简单语法 我的MYSQL学习 ...
- 从shell(终端)中退出python
从shell(终端)中退出python: 1.输入命令行:$ exit() 2.快捷键: ctrl+Z
- Leetcode 522.最长特殊序列II
最长特殊序列II 给定字符串列表,你需要从它们中找出最长的特殊序列.最长特殊序列定义如下:该序列为某字符串独有的最长子序列(即不能是其他字符串的子序列). 子序列可以通过删去字符串中的某些字符实现,但 ...
- [问题解决]docker启动不了
问题描述:昨天下午整合了同事的代码,发现docker启动好后,docker ps查看不到,docker ps -a发现docker容器没有启动. 尝试多次启动发现都是启动不了. 经过搜索发现 http ...
- 【bzoj3601】一个人的数论 莫比乌斯反演+高斯消元
题目描述 题解 莫比乌斯反演+高斯消元 (前方高能:所有题目中给出的幂次d,公式里为了防止混淆,均使用了k代替) #include <cstdio> #include <cstrin ...
- 简单Dp----最长公共子序列,DAG最长路,简单区间DP等
/* uva 111 * 题意: * 顺序有变化的最长公共子序列: * 模板: */ #include<iostream> #include<cstdio> #include& ...
- ZigBee学习四 无线+UART通信
ZigBee学习四 无线+UART通信 1) 协调器编程 修改coordinator.c文件 byte GenericApp_TransID; // This is the unique messag ...
- 实现段落文字两端对齐的css样式
有时候网站中的文字比较多,虽然为父元素设置了宽度,但是总是会出现两端参差不齐的情况,看起来不整齐.其实实现段落的两端对齐,只需要设置两个css 样式即可. .demo{ text-align: jus ...
- hihoCoder #1809 : 本题数据范围五千
Analysis (一) 猜想:答案跟 $q_1, q_2, q_3$ 无关:考虑排列 $q$ 是 $1, 2, 3$ 的情况,此时符合要求的排列 $p$ 实际上满足: 对于任意 $i < j ...