Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Improve query performance instead of aggregrate function

user12251389Aug 18 2017 — edited Aug 18 2017

I have query where i want to change the SALES_DATE to '01.01.2017' for the 1st record for a product. It means i want to get every unique product which is stored in PRODUCT_ID and check the first SALES_DATE on which the product is loaded and change this SALES_DATE to '01.01.2017'.

I have used the below query which is working but its hitting the performance it seems. So is there any other i can write the same logic and improves the performance?

UPDATE TEST_GROUP sd

set SALES_DATE = TO_DATE ('01.01.2017', 'dd.mm.yyyy')

where SALES_DATE =

( select min(SALES_DATE)

   from TEST_GROUP sd2

   where sd.PRODUCT_ID = sd2.PRODUCT_ID  

)

and sd.SALES_DATE <> TO_DATE ('01.01.2017', 'dd.mm.yyyy');

Comments

Andreas Weiden
From ORA-06508 is seems like WEBUTIL.pll is not found in the runtime-environment.

Possible solutions:
Check if the WEBUTIL.pll (or plx) is on the path where the fmx-File is placed.
If not, check the FORMS90_PATH in your env-File (normally default.env) (you didn't mention your forms-Version, may also be FORMS60_PATH) and if the WEBUTIL.pll is in that path, if not adjust the env-file.
If its still not working, check if WEBUTIL.pll is attached including the full Path (unattach WEBUTIL.pll and reattach it without the path)
Last hint: Case-sensitivity: If you attach in lowercase-letters and library is in uppercase on unix-system the library will not be found at runtime. You won't see how the the pll was attached, best method is to unattach library and reattach it in correct case.

Another remark:
The DDE-Exception seem to be useless, because you don't use DDE (and i would not work for its not available under unix).

Hope this helps
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 15 2017
Added on Aug 18 2017
28 comments
1,318 views