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 ...
随机推荐
- Hyper-V 网络虚拟化技术细节
Hyper-V 网络虚拟化技术细节 适用对象:Windows Server 2012 R2 服务器虚拟化能让多个服务器实例在同一台物理主机上同步运行,但各个服务器实例都是相互独立的. 每台虚拟机的运作 ...
- CSS中behavior属性语法简介
本文和大家重点讨论一下CSS中behavior属性语法的使用,在进行CSS网页布局的时候,我们经遇到刷新要保留表单里内容的时候,习惯的做法使用cookie,但是那样做实在是很麻烦,CSS中的behav ...
- C++编程规范(101条准则)
记录学习,方便以后查看. 2014-12-28 看完这本书,但是我做到的又有多少呢?确实有一部分 0 不要拘泥于小节 1 在高警告级别干净利落的进行编译,不放过任何警告 2 使用自动构建系统 3 使 ...
- Python面向对象之私有方法(4)
类里面有很多成员修饰符,用来修饰各种属性 (1)私有属性,只有内部的方法可以访问 class Foo: xo = 'xo'#表明是公共的,内部外部都可以访问 __ox = '私有属性'#私有属性,只有 ...
- jquery操作select(取值,设置选中
比如<select class="selector"></select> 1.设置value为pxx的项选中 $(".selector" ...
- Log4j官方文档翻译(九、输出到数据库)
log4j提供了org.apache.log4j.JDBCAppender对象,可以把日志输出到特定的数据库. 常用的属性: bufferSize 设置buffer的大小,默认是1 driver 设置 ...
- 【线性基】51nod1312 最大异或和&LOJ114 k大异或和
1312 最大异或和 题目来源: TopCoder 基准时间限制:1 秒 空间限制:131072 KB 分值: 320 难度:7级算法题 有一个正整数数组S,S中有N个元素,这些元素分别是S[0] ...
- java读取文件的基本操作
import java.io.FileInputStream; /** * 使用FileInputStream读取文件 */ public class FileRead { /** * @param ...
- vue单文件组件互相通讯
在vue中,我们可以把一个页面各个部分单独封装起来,做成各种小组件,然后加载,这样的好处是代码维护起来比较容易,重复的代码多处调用! 在一个vue项目中,单文件组件以.vue形式文件命名 每个组件之间 ...
- 【HDOJ5536】Chip Factory(Trie树)
题意:给定n个数字,第i个数字为a[i],求max((a[i]+a[j])^a[k]),其中i,j,k互不相同 n<=1000,0<=a[i]<=1e9 思路:队友写的,抱大腿 先对 ...