【正文】
――》診斷——》檢查,在對(duì)話框中block中輸入system,在field中輸入last_query,然后把光標(biāo)移到value中,系統(tǒng)會(huì)自動(dòng)給出一段sql語(yǔ)句 然后把sql語(yǔ)句拷到sql window中找到from后的視圖(表)是PO_REQUISITION_LINES_V,然后點(diǎn)擊右鍵,選擇Edit,又找到視圖(表)Po_Requisition_Lines,然后再點(diǎn)擊右鍵,選擇Edit,找到基表Po_Requisition_Lines_All,看表名,可以知道是一個(gè)行表,根據(jù)以上的介紹,可以找到頭表應(yīng)為,Po_Requisition_headers_All。 附: _all,基表,保存多組織數(shù)據(jù),里面有一個(gè)Org_Id字段,一般不直接出現(xiàn)在我們的DML中 去掉_all的視圖,根據(jù)用戶環(huán)境過濾掉組織,相當(dāng)于普通的基表,我們直接使用它,就當(dāng)它是基表 _v,視圖,給Form用 _kfv,啟用關(guān)鍵性彈性域的時(shí)候動(dòng)態(tài)生成的視圖,包含Concact過的字段組合 _dfv,啟用描述性彈性域的時(shí)候動(dòng)態(tài)生成的視圖,我們?nèi)椥杂蜃佣蔚拿枋龅臅r(shí)候,需要用用戶出口函數(shù)。BACKGROUNDCOLOR:white。顧名思義,它是一種設(shè)計(jì)網(wǎng)頁(yè)樣式的工具實(shí)際上CSS的代碼都是由一些最基本的語(yǔ)句構(gòu)成的。BODY 標(biāo)記一般不省略, 表示正文內(nèi)容的開始?! ∮扇N方式拋出異?! ? 通過PL/SQL運(yùn)行時(shí)引擎 . 使用RAISE語(yǔ)句 . 調(diào)用RAISE_APPLICATION_ERROR存儲(chǔ)過程 當(dāng)數(shù)據(jù)庫(kù)或PL/SQL在運(yùn)行時(shí)發(fā)生錯(cuò)誤時(shí),一個(gè)異常被PL/SQL運(yùn)行時(shí)引擎自動(dòng)拋出。視圖的定義視圖是一個(gè)虛擬的、不是物理存在的表,他是通過sql語(yǔ)句把一個(gè)或多個(gè)表連接在一起形成的.2002031539。yyyy/mm/dd39。 to_char (sysdate, 39。)。July 09, 200339。yyyy/mm/dd39。$9,39。39。54639。Tech on the net39。 instr (39。e39。 the first occurrence of 39。Hewlett Packard39。Tech on the Net39。This is a test39。 ORDER BY supplier_city。 SELECT * FROM supplier WHERE supplier_name like 39。Microsoft39。, 39。本文檔只關(guān)注運(yùn)用Oracle 在DB中提供的一些開發(fā)工具包,及WEB技術(shù)開發(fā)報(bào)表的過程和方法。This select statement will return all records from the suppliers table where there is at least one record in the orders tableith the same supplier_id.Example 2 NOT EXISTS The EXISTS condition can also be bined with the NOT operator. For example, SELECT * FROM suppliers WHERE not exists (select * from orders Where = )。 This would return all rows where the supplier_name is either IBM, Hewlett Packard, or Microsoft. Because the * is used in the select, all fields from the supplier table would appear in the result set.Example 2 NOT IN The IN function can also be bined with the NOT operator. For example, SELECT *FROM supplierWHERE supplier_name not in ( 39。Hew%39。 aggregate_function can be a function such as SUM, COUNT, MIN, or MAX. Example using the SUM function For example, you could also use the SUM function to return the name of the department and the total sales (in the associated department). SELECT department, SUM (sales) as Total salesFROM order_detailsGROUP BY department。 ORDER BY supplier_city DESC。 substr (39。decode( expression , search , result [, search , result]... [, default] ) This function has the functionality of an IFTHENELSE statement For Example: SELECT supplier_name,decode (supplier_id, 10000,39。) result FROM suppliersinstr(string1, string2, [start_position], [nth_appearance]) This function returns the location of a substring in a string For example:instr (39。Tech on the net39。, 39。e39。, 3, 2) would return 2Trim(text) This function removes leading and trailing spaces from a string For exampleTrim ( Tech on the Net) would return Tech on the Net Trim ( Alphabet ) would return AlphabetRTrim (text)This function removes trailing spaces from a stringFor example:RTrim (Tech on the Net ) would return Tech on the Net RTrim ( Alphabet ) would return Alphabet LTrim (text) This function removes leading spaces from a string For example:LTrim ( Tech on the Net) would return Tech on the Net LTrim ( Alphabet ) would return Alphabet to_number (string1, [format_mask], [nls_language] ) This function converts a string to a number For example:to_number (39。) would return the number 546 to_number (39。 to_char (, 39。 to_char (21, 39。2003/07/0939。)。 to_char (sysdate, 39。 would return 39。07090339。)。oracle允許聲明其他異常條件類型以擴(kuò)展錯(cuò)誤/異常處理。用HTML編寫的超文本文檔稱為HTML文檔,它能獨(dú)立于各種操作系統(tǒng)平臺(tái)(如UNIX,WINDOWS等)。 跨多行的表元 th rowspan= td rowspan= rowspan所要表示的意義是指跨越的行數(shù),例如rowspan=2就表示這一格跨越表格兩個(gè)行的高度 4 插入圖象的標(biāo)簽是IMG,其格式為: IMG SRC=圖形文件地址 SRC屬性指明了所要鏈接的圖象文件地址,這個(gè)圖形文件可以是本地機(jī)器上的圖形,也可以是位于遠(yuǎn)端主機(jī)上的圖形。}td {fontfamily:宋體。}.td_css{border:solid windowtext .5pt。Id的優(yōu)先級(jí)高于Value,但一般我們只定義Value,類型一般選擇“可變字符2”,大小輸入字段的大約的最大值;在出處/排序依據(jù)處輸入要限定和排序依據(jù)。 3 建立包,用于生成報(bào)表 所建立的包遵從與作者的以往開發(fā)習(xí)慣 在pl/sql developer中新建立一個(gè)包,包名為:FH_RP_PO001,Purpose:請(qǐng)購(gòu)單 然后從別的PKG中復(fù)制包頭,修改用與要開發(fā)的包適合,然后把包體復(fù)制到FH_RP_PO001,修改insert_table過程, 接著修改游標(biāo): 最后修改包的執(zhí)行體(begin ―― end) 包頭代碼為: create or replace package FH_RP_PO001 is Author : Created : 200532 9:53:42 Purpose :請(qǐng)購(gòu)單 rp_title Varchar2(100) := 39。 內(nèi)表格的屬性 rp_style 。 方法定義區(qū)域 /**************************************************************************** * 定義了報(bào)表的一些基本參數(shù)每張報(bào)表基本有兩個(gè)table嵌套而成,分為外表格和內(nèi)表格 ****************************************************************************/ Procedure init_rep_type Is Begin 定義具體TB/TD Css修飾 rp_style(1) := 39。 rp_style(4) := 39。 rp_style(8) := 39。 初始化報(bào)表的內(nèi)表格 End init_rep_type。 (tb_outer)。30%39。 (0,39。 (2,39。20%39。,rp_style(8),tb_inner)。,39。 arr_body(3) := 。40%39。30%39。 (0,39。 。 End IfpNowCount:類型:Number說明:顯示每頁(yè)頁(yè)碼,例如:共10頁(yè) 第1頁(yè),可以這樣表示:“共”|| pPageCount || “頁(yè)” || “ ” || “第”|| pNowCount || “頁(yè)”pBlankCount: 類型:Number說明:最后一頁(yè)需要補(bǔ)的空行數(shù)pBlankCount = pBaseCount - pRemainCount九. 做分頁(yè)報(bào)表時(shí),每個(gè)報(bào)表的樣式都相同,可以把其中共性的程序提取出來,做成過程,方便應(yīng)用。 openFile(), addAccount() 記錄(Record)、游標(biāo)(Cursor)、數(shù)組(Array)n 采用完整的英文描述說明記錄(游標(biāo)、數(shù)組)的功能,前四個(gè)字符應(yīng)為‘rec_’(’cur_’、‘a(chǎn)rr_‘),后跟一個(gè)說明性的名詞,說明此記錄(游標(biāo)、數(shù)組)的功能。前三個(gè)字符應(yīng)為‘**_’ (**表示客戶公司的所寫),基表的最后三個(gè)字符為‘_tb’,臨時(shí)表的最后七個(gè)字符應(yīng)為‘_tmp_tb’,中間是能說明此表功能的名詞。gCompanyName、gOrderNumbern 局部變量第一個(gè)字母應(yīng)為’d’。 End if。 End main_proc。,rp_style(5),tb_inner)。 Close cur_head。 (9,39。 (0,39。 Loop Fetch cur_head Into row_head。單位39。 (9,39。colspan=339。 ||