ANY /ALL
ANY 、ALL、 子查询[@more@] 子查询不能使用ORDER BY,且只能从一个表中取数据; 当需要使用聚集函数,并将它的值和其他值进行比较时,要使用子查询; 当查询的结果要显示多个表的内容时,使用连接; ANY 表示与子查询中每一个值进行比较,如果有一个比较为真,则整个子查询的结果集的比较就为真; SELECT e.empno,e.ename,e.job,e.sal FROM scott.emp e WHERE 20<=ANY ( SELECT deptno FROM scott.dept WHERE e.deptno=
About join~!
left joinright join self joinP.S http://www.cnblogs.com/eflylab/archive/2007/06/25/794278.html[@more@] 左连接:将左表中的所有数据分别与右表中的每条记录进行连接组合,返回的结果除了内连接的数据外,还有左表中不符合条件的数据,并在右表的相应列中填上NULL值; 自连接: create table t_emp( emp_id number , emp_name varchar2(10)
A example about exists!
P.S : http://www.itpub.net/861853,1.html[@more@]SQL> select * from v_test; ID NAME---------- ---------- 120 hospitalSQL> select * from v_test_1; ID G---------- - 120 M 110 FSQL> select a.id,a.name from v_test a 2 where exists (select null from v_test_1 b where b.id = a.id); ID NAME---------- ---------- 120 hospitalSQL> select a.id,a.name from v_test a 2 where exists (select null from v_test_1 b where b.id <> a.id); ID NAM
Oralce开发心得整理
p.s http://publish.it168.com/2005/1102/20051102033101.shtml[@more@]实在对象如表格、Sequence、索引等建在本应用对应的用户表空间中,其他对象如视图、别名创建在Apps下,常见错误是新手把表建在APPS下,以后又来建别名,这个时候删除别名时会报对象不存在,而建别名的时候又报对象已存在 如果把脚本保存在文件里面,注意一个块比如一个创建视图的语句不要有空行,否则会出现如下情况:把语句拷贝到SQL Window能正常运行,用@执行文件却报错 如果要执行execute_query,注意要go_block到适当的Block,但是go_block是个受
ENTER-QUERY
P.S http://www.itpub.net/370227.html[@more@]
Form9iBlock实现查询条件记忆刷新
p.s http://blog.csdn.net/snowfall/archive/2005/09/23/488193.aspx[@more@]在项目中用户使用输入查询并执行后,执行Execute_Query语句则自动恢复Default_Where条件查询,希望保留输入的查询条件,则可以使用下面的方法。程序自动记忆用户输入的查询条件,并通过直接单击“执行查询”按钮恢复Default_Where条件过滤。需创建以下参数:请根据查询条件的复杂度设定长度!:parameter.d_where 存储Block的Default_Where:parameter.lastwhere 存储Block的前次查询条件(用户输入)使用Block的KEY-EXEQRY触发器declare v_query VARCHAR2
Oracle Forms Server 疑难排解
P.S http://blog.chinaitlab.com/user1/263089/archives/2005/18679.html[@more@]1 CHECKING FOR FORM_SUCCESS AFTER CALLING A FORMS BUILT-IN在调用一个form后,通过 FORM_SUCCESS 内置子程序返回一个可以表示最近一个表单操作成功与否的布尔值,其值为TRUE(成功)和FALSE(失败、严重错误)。如果内置子程序没有成功执行,应该触发FORM_TRIGGER_FAILURE异常处理程序。FORM_FAILURE/FORM_FATAL其中 FORM_FAILURE是与FORM_SUCCESS对应,而FORM_FATAL的结果值为TRUE(严重错误)和FALSE(成功、失败)2 TROUBLESHOOTING WITH “QUICK AND
Form 开发问题
P.S http://www.itpub.net/741775,1.html[@more@]可看一下
:system.form_status
:system.form_statusp.s http://www.itpub.net/61129.html[@more@]系统变量:system.form_status代表了form的状态:'CHANGED', 'NEW', 'QUERY'。按下默认[exit]键或选择默认菜单中的exit项时,程序执行的是do_key('KEY-EXIT')。如果没有自定义key-exit触发器,do_key('KEY-EXIT')调用key-exit对应的默认built-in过程: exit_form。exit_form实际上有三个重载过程:exit_form; exit_form(commit_mode);exit_form(commit_mode, rollback_mode);exit_form等于exit_form(ASK_COMMIT)。它将检查system.form_status,如果不为'QUERY',弹出对话框提
About CLEAR_BLOCK(NO_VALIDATE);
p.s http://www.itpub.net/28962.html http://hi.baidu.com/huitonet/blog/item/e238a3d3d7d50534970a1694.html[@more@]高人请指点:FORM45中CLEAR_BLOCK如何不提示存盘? 高人请指点:FORM45中CLEAR_BLOCK如何不提示存盘?思路如下:使用查询从几个表中查询出初步需要的信息,插入基于基表的块中,再根据其他条件判断该记录是否需要保存,IF NOT THEN CLEAR_BLOCK,这是提示我是否保存更改的信息。这时是不需要保存的,为此想将该信息屏蔽掉。1):SYSTEM_MESSAGE_LEVLE:='25';--》无效,仍然提示2)clear_block(no_commit);--》无效
Oracle Form Builder中使用树的心得
一、树的简介 Developer 6.0以上版本提供了hierarchy tree(层次树)的概念,htree控件非常方便,只需要少量的编程即可实现显示层次结构的目的。[@more@]一、树的简介 Developer 6.0以上版本提供了hierarchy tree(层次树)的概念,htree控件非常方便,只需要少量的编程即可实现显示层次结构的目的。树的特有属性中如下几个较为重要:l 多项选择(Multi-Selection):是否允许一次选中树的多个节点。如果不允许,那么 选中第二个节点时,第一个被选中的节点会取消选择。l 记录组(Record Group):指定生成树的记录组的名字。简单介绍一下
Oracle SQL 九九乘法表
p.s http://www.phpchina.com/78/viewspace_13822.html[@more@]select reverse(sys_connect_by_path(reverse(rpad(rownum * lv, 2)) || '=' || rownum || '*' || lv, ' ')) from (select level lv from dual connect by level < 10) where lv = 1connect by lv + 1 = prior lv;
Using SQL-Loader to load data into Oracle
p.s http://www.phpchina.com/78/viewspace_14655.html[@more@]Oracle ResourcesUsing SQL-Loader to load data into OracleThe Oracle system in the labs has a software program called SQL-Loader that can be used to load large amounts of data into Oracle. This guide describes the command line version which is run from DOS. Oracle also has a Windows interface to this program. If you chose to use the Windows interface then the last step in this guide (Run SQL-Loader) will be different. There are four st
Trigger Execution Sequence in Oracle Forms
p.s http://www.phpchina.com/78/viewspace_13811.html[@more@]This document lists the order in which triggers fire in Oracle Forms 4.5: o The first column, Action, describes the function to be performed (e.g. deleting a record). o The second column, Trigger Firing Order, describes the order in which triggers fire after a function is performed. o The third column, Level, describes the level (form, block, item) at which the trigger fires. This was accomplished by creating a form with
Oracle 1z0-311 Exam
p.s http://www.phpchina.com/40302/viewspace_13652.html[@more@].View the Exhibit and examine the contents of the portlist.ini file. You changed the password for the portal schema in the infrastructure database by using the ALTER USER SQL command. You are able to connect as portal to the infrastructure database. You use the following URL to access the associated OracleAS Portal instance, but you are not able to log in as user portal: http://host.domain:7778/pls/portal Which two causes could be th
对刚接触oracle的人比较有用的一些工具
p.s http://www.phpchina.com/10471/viewspace_10288.html[@more@]
TO_DATE函数的小问题
p.s http://www.phpchina.com/755/viewspace_6556.html[@more@]SQL> ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS';会话已更改。SQL> SELECT TO_DATE('2006-05-01 19:25:34', 'YYYY-MM-DD HH24:MI:SS') FROM DUAL;TO_DATE('2006-05-01-------------------2006-05-01 19:25:34SQL> SELECT TO_DATE('2006-05-01 19:25', 'YYYY-MM-DD HH24:MI') FROM DUAL;TO_DATE('2006-05-01-------------------2006-05-01 19:25:00SQL> SELECT TO_DATE('2006-05-01 19', 'YYYY-MM-DD HH24') FROM DUAL;TO_DATE('2006-05-01---
Oracle Forms6i 属性类、对象组、对象库用法
p.s http://www.phpchina.com/78/viewspace_13836.html[@more@] 对象组对导航器中的所有对象和属性进行打包,在对象组里可以建立多个子组,来进行分类。当别的Form要用到这些对象类时,通过把对象组放入对象库,存成*.olb文件实现共享。而属性类只是对属性的打包,在不同的Form中共享属性类时,必须通过对象组。 对象组使你包装可重用对象,为以后的复制或划分子类所用。对象组在单个标题下的模块中收集一组对象。通过复制或者划分对象组的子类,可以得到它包含的所有对象。可以将任意的对象向下组合到数据块层,但不能对块内的项目
What's the different between left joint and right joint in PLSQL?
You can see the different between left joint and right joint by a simple example![@more@]SQL> SELECT * FROM T_0918;ID T_A ---------- ---------- 1 A1 2 A2 4 A4SQL> SELECT * FROM T_0918_2;ID T_B ---------- ---------- 1 B1 2 B2 3 B3 SQL> SELECT T_A,T_B FROM T_0918,T_0918_22 WHERE T_0918.ID(+)=T_0918_2.ID;T_A T_B ---------- ---------- A1 B1 A2 B2 B3 SQL> SELECT T_A,T_B FROM T_0918,T_0918_22 WHERE T_0918.ID=T_0918_2.ID(+
See the constraint properrty of a table!
ex:SELECT CONSTRAINT_NAME FROM USER_CONSTRAINT_NAMEWHERE TABLE_NAME=' '; [@more@]