How to run debug SQL with in front end(EBS)?

Somtimes, we will need to debug some SQLs and try to run them within environment parameters.
It will be complex to debug in PL/SQL by setting fnd_client_infor or else.

Following is the way to run debug SQL quickly within the right environgment you want:

(1) Login any application or form to the situation you want to chek SQL data (e.g. Enter 'Inventory' resp, change organization to M1 and open Receiving Transaction form and go on with following steps)
(2) Click menu 'Help' - 'Diagnostics' - 'Examine'
(3) Imput apps password and OK
(4) Enter the following information in 'Examine Field and Variable Values' window:
-- Block = *SELECT*
-- Field = Input you SQL here and TAB , you will get the SQL result

Kep points: this function has lots of limitation and please find the tips below

(A)For only 1 field of just 1 row: Suggest you to try the following 'Field' to get the sense of it:

--Right Test case1:sysdate
--Right Test case2:(Select count(*) from po_headers_all)
--Right Test case3:(Select segment1 from po_headers_all where segment1 like 'TAG%' and rownum=1)
--Wrong test case 4: (Select segment1,creation_date from po_headers_all)
--Wrong test case 5: (Select segment1,creation_date from po_headers_all and rownum=1)
--Right test case 6: (Select segment1 from po_headers_all and rownum=1)

Solution: If you want to select multi rows or columns, you should change condition and select to run more times.

(B)SQL length is limited to 80

--Right Test case3:(Select segment1 from po_headers_all where segment1 like 'TAG%' and rownum=1) --Length is 79 < 80 and OK
--Wrong Test case3:(Select NVL(segment1,'88') from po_headers_all where segment1 like 'TAG%' and rownum=1) --Length overflow

Solution: If we need to run a big SQL which is more than 80 (e.g. 1000 chars), we can create a view in PL/SQL(e.g. CPO_TAG_TEST1_V) and use the view for a single query (e.g. Select segment1 from CPO_TAG_TEST1_V where rownum=1)

Hope it will be helpful in your work, especially in View debug and test data inquiry.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值