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 ...
随机推荐
- 在 Amazon AWS 搭建及部署网站:(二)安装、配置软件,启动网站
现在,我们已经有了一台EC2主机,具备了基本的硬件环境.下面,开始软件环境的配置. 第一步:连接服务器 后面所有的一切,都需要在SSH终端窗口操作.首先,我们需要一个SSH客户端.PuTTY是很常用的 ...
- sql注入语句大全
sql注入语句大全--是否存在xp_cmdshell and 1=(select count(*) from master.dbo.sysobjects where xtype = 'x' and n ...
- js深度复制
项目过程遇到需要对一个对象处理,然后独立出来用,结果怎么处理都会影响到原有变量,原来是引用导致,只有深度复制才行. 最终用下面的赋值方法才搞成功 var result=$.extend( true, ...
- C#中找不到MouseWheel事件的解决办法
在.....Designer.cs中加入 this.pictureBox1.MouseWheel += new System.Windows.Forms.MouseEventHandler(this. ...
- String.intern() (jdk1.8)
1.通过字面量赋值创建字符串 (如:String str=”aaa”)时,会先在常量池中查找是否存在相同的字符串,若存在,则将栈中的引用直接指向该字符串:若不存在,则在常量池中生成一个字符串,再将栈中 ...
- 【CCF】JSON查询
#include<iostream> #include<cstdio> #include<string> #include<cstring> #incl ...
- 【CF1016C】Vasya And The Mushrooms(模拟)
题意:给定一个2*n的矩阵,每一个点有一个权值,从左上角出发,时间t=0开始,连续的走,将矩阵走完, 每走一步,t++,并且得到t*当前格子的权值的值,求最大的权值和 n<=3e5,1<= ...
- sooket数据成传输压缩
样压缩不以文件为基础的数据 Q: 回答了两个使用Java进行数据压缩的问题. 第一个问题是: 我怎样才能压缩那些不在文件中的数据. 第二个问题是: 我以极大的热情阅读了Todd Sundsted的&q ...
- android基本控件学习-----Date&Time
Date&Time这里一共讲解下面6个: TextClock(文本时钟),AnalogClock(模拟时钟),Chronometer(计时器),DatePicker(日期选择器),TimePi ...
- 《Linux命令行与shell脚本编程大全 第3版》Linux命令行---2
以下为阅读<Linux命令行与shell脚本编程大全 第3版>的读书笔记,为了方便记录,特地与书的内容保持同步,特意做成一节一次随笔,特记录如下: <Linux命令行与shell脚本 ...