常用資料整理

2021-06-08 20:21:32 字數 4577 閱讀 3577

本問將整理常用的內容,以防止長時間不用而忘記。   

1.查詢xml publisher輸出xml的路徑,以便查出資料xml產生情況,便於除錯 

select outfile_name from fnd_concurrent_requests where request_id= 4212253,

2.fnd: personalization region link enabled, personalize self-service defn:控制oaf個性化,如果設定後不能生效,則需要重啟ap

3.公司的cost manager已經罷工2次了,而且2次都等到月底結賬時才發現,造成月底很忙的時候,還要讓cost manager計算很多資料。下面是查詢cost manager狀態的**,以便,每週都檢視一下,防止再次出現類似問題。

select request_id requestid,

request_date requestdt,

phase_code phase,

status_code status

4.庫存交易後檢視成本資訊的**:

select *  from  cst_inv_distribution_v cidv

where cidv.transaction_id=44733943

5.在so中抓ship to,bill to的一段指令碼

select bill_to.location,

bill_to.customer_name bill_to_customer,

bill_to.address_line_1 bill_to_address ,      

ship_to.location,

ship_to.customer_name bill_to_customer,

ship_to.address_line_1 bill_to_address ,   

tt.invoice_to_org_id  ,

tt.sold_to_org_id

, tt.ship_to_org_id

, tt.sold_to_org_id ,

tt.*

from oe_order_lines_all tt,

(select /*+ index(acct_site,hz_cust_acct_sites_n2) */

site.location,

party.party_name customer_name,

site.site_use_id organization_id,

site.location location_code,

loc.address1 address_line_1,

loc.address2 address_line_2,

loc.address3 address_line_3,

decode(loc.city, null, null, loc.city || ', ') ||

decode(loc.state, null, loc.province || ', ', loc.state || ', ') ||

decode(loc.postal_code, null, null, loc.postal_code || ', ') ||

decode(loc.country, null, null, loc.country) address_line_4,

loc.address4 address_line_5,

cust_acct.cust_account_id customer_id,

cust_acct.account_number customer_number

from hz_cust_acct_sites_all acct_site,

hz_party_sites         party_site,

hz_locations           loc,

hz_cust_site_uses_all  site,

hz_parties             party,

hz_cust_accounts       cust_acct

where site.site_use_code = 'bill_to'

and site.cust_acct_site_id = acct_site.cust_acct_site_id

and acct_site.party_site_id = party_site.party_site_id

and party_site.location_id = loc.location_id

--  and acct_site.status = 'a'

--and   acct_site.cust_account_id =  --:parameter.lov_num_param1

and acct_site.cust_account_id = cust_acct.cust_account_id

and cust_acct.party_id = party.party_id

--  and cust_acct.status = 'a'

--  and site.status = 'a'

--and site.location='hk/mgn'

-- and cust_acct.account_number='1277'

-- and site.site_use_id=1262 --2524  --2584

-- and cust_acct.cust_account_id = 1098   ---customer_id

order by site.location) bill_to,

(select   /*+ index(acct_site,hz_cust_acct_sites_n2) */

site.location,party.party_name customer_name,site.site_use_id

organization_id,site.location location_code,loc.address1 address_line_1,

loc.address2 address_line_2,loc.address3 address_line_3,

decode(loc.city,null, null, loc.city|| ', ')

||decode(loc.state, null, loc.province || ', ', loc.state || ', ') ||

decode(loc.postal_code,null, null, loc.postal_code || ', ') ||

decode(loc.country, null, null, loc.country) address_line_4 ,

loc.address4 address_line_5,

cust_acct.cust_account_id customer_id,

cust_acct.account_number customer_number

from

hz_cust_acct_sites_all     acct_site,

hz_party_sites             party_site,

hz_locations               loc,

hz_cust_site_uses_all      site,

hz_parties           party,

hz_cust_accounts      cust_acct

where

site.site_use_code         = 'ship_to'

and   site.cust_acct_site_id     = acct_site.cust_acct_site_id

and   acct_site.party_site_id    = party_site.party_site_id

and   party_site.location_id     = loc.location_id

and    acct_site.status='a'

--and   acct_site.cust_account_id=:parameter.lov_num_param1

and acct_site.cust_account_id=cust_acct.cust_account_id

and cust_acct.party_id=party.party_id

and cust_acct.status='a'

and site.status='a'

order by site.location

) ship_to

where tt.line_id = 4051505

and bill_to.organization_id = tt.invoice_to_org_id --1262

-- and bill_to.customer_id(+) = tt.sold_to_org_id  --1098   1051

and ship_to.organization_id = tt.ship_to_org_id

-- and ship_to.customer_id(+) = tt.sold_to_org_id

postgres資料常用整理

常用函式 1 字串函式 1 字串拼接 2 字串長度 length 3 字串擷取 substring fsfd from 2 for 3 substr fsfd 2,3 4 字串兩頭去字元 trim fsf trim both x from xfdsx 5 大小寫轉換 upper lower 6 替換...

DB2常用資料整理

db2 基礎 日期和時間的使用 db2 中的列組統計資訊 dba將向何處去?db2 9.5 for linux的安裝方法 db 完整性控制 db2和oracle體系結構 建立db2伺服器報表並在前端access顯示 db2 備份恢復和錯誤處理方法 修改db2預設值,降低記憶體占用 db2 v9 64...

資料倉儲常用表整理

資料倉儲常用表拉鍊表寬表等詳解 全量表 全量表沒有分割槽,表中的資料是前一天的所有資料,比如說今天是24號,那麼全量表裡面擁有的資料是23號的所有資料,每次往全量表裡面寫資料都會覆蓋之前的資料,所以全量表不能記錄歷史的資料情況,只有截止到當前最新的 全量的資料。快照表 也叫切片資料,那麼要能查到歷史...