Posts

Showing posts with the label Oracle SQL
Dear Friends ,  Below Query can be useful to find the Unit cost of Item at costing Module . We can have  FOR Unit cost OF Material under specified Val Unit code AND Cost Book SELECT TO_CHAR ( CICT . total_cost , 'fm99999999d00' ) UNIT_COST FROM CST_ITEM_COSTS_V CICT , CST_TRANSACTIONS CT WHERE 1 = 1 AND CICT . ITEM_NUMBER = :P_Item_Number AND CICT . TRANSACTION_ID = CT . TRANSACTION_ID AND TRUNC ( CICT . PREVIOUS_COST , 6 ) = ( SELECT TRUNC ( UNIT_COST_AVERAGE , 6 ) FROM cst_perpavg_cost WHERE PERPAVG_COST_ID = ( SELECT MIN ( PERPAVG_COST_ID ) FROM cst_perpavg_cost WHERE TRANSACTION_ID = CICT . TRANSACTION_ID ) ) AND CICT . VAL_UNIT_CODE LIKE 'XXXXXX' AND TO_CHAR ( CT . TRANSACTION_DATE , 'DD-MM-YYYY' ) BETWEEN TO_CHAR ( :P_START_DATE , 'DD-MM-YYYY' ) AND TO_CHAR ( :P_END_DATE , 'DD-MM-YYYY' ) And If you want to have the Query to fetch Current Item cost ...
Image
 Dear Friends , There is one small requirement we face mostly while developing the BI Report in fusion cloud Application . How to enable the Multiple choice list of parameter for the BIP Report such as below and How to make necessary change in the Data model of SQL Query . The above Choice List needs to be setup at Parameter Section Like Below  If you have such requirement for your report , Use the COALESCE function for that column in your  SQL Query .  Example : you can write something like below this will help to retrieve all Items as well as Null values at the same times . It will fulfil all such scenarios . AND (    ESI.ITEM_NUMBER=(Coalesce(NULL, :P_ITEM_NUMBER))     OR ESI.ITEM_NUMBER IN (:P_ITEM_NUMBER)   )  You can also use such as below , All scenarios will be handled  (COALESCE(null, : P_ITEM_NUMBER ) is null) OR ( ESI.ITEM_NUMBER  IN (: P_ITEM_NUMBER )) Hope above solution will help to achieve the goal of Mult...
Hi Friends Lets Understand What is Synonym It is the Schema object which is the alternate name for the database object. It avoids the Schema name entry to the database. Syntax:- Create Synonym <Synonym_name > For SCHEMA.OBJECT; Example:- CREATE SYNONYM GHAN for SCOTT.GHAN; NOTE :- Assuming GHAN is Database Table .