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 ...
随机推荐
- 可拖动jquery插件
http://www.open-open.com/ajax/DragDrop.htm http://sc.chinaz.com/info/130722592854.htm http://sc.itcn ...
- IOS开发---菜鸟学习之路--(二十一)-利用正则表达式解析URL获取其中的参数
因为项目需要解析URL当中参数的部分,在网上搜索了一下都没有相关的资料. 然后就自己写了一个 其实我就是通过正则表达式来处理URL 进行解析的 好了直接上代码吧 也是非常的简单,大家拷贝过去就可以使用 ...
- c++ primer plus 第6版 部分三 9章 - 章
c++ primer plus 第6版 部分三 9章 - 章 第9章 内存模型和名称空间 1.单独编译 ...
- LeetCode——Problem2:Add Two Numbers
这又过了一周了,总感觉刷这个好花时间呀.每次都一两个小时.让我不好安排时间.应该是我太菜了.对,没错,就是这样 1.题目 You are given two non-empty linked list ...
- HDU5862 Counting Intersections
Given some segments which are paralleled to the coordinate axis. You need to count the number of the ...
- nyoj 题目20 吝啬的国度
吝啬的国度 时间限制:1000 ms | 内存限制:65535 KB 难度:3 描述 在一个吝啬的国度里有N个城市,这N个城市间只有N-1条路把这个N个城市连接起来.现在,Tom在第S号城市, ...
- Could not connect to Redis at 127.0.0.1:6379: Connection refused
启动redis: redis-server ../redis.conf redis启动成功后 执行命令行redis-cli报:Could not connect to Redis at 127.0. ...
- activemq 简单聊天
有兴趣加群qq:200634530
- BZOJ 2818: Gcd(欧拉函数)
GCDDescription 给定整数N,求1<=x,y<=N且Gcd(x,y)为素数的数对(x,y)有多少对. Input 一个整数N Output 如题 Sample Input 4 ...
- jackson 的UnrecognizedPropertyException错误
阅读更多 前段时间,使用jackson封装了json字符串转换为javabean的方法,代码如下: public static <T> T renderJson2Object(String ...