i have a master detail form, In Master block we have one field cheque amount and in Detail block we have field receiveable amount invoice wise. if company paid us a cheque amount we will enter this amount in Master block field Cheque amount and in detail block there will be invoice wise receivable amounts. i want to distribute the cheque amount in detail block invoice wise for example
Cheque amount in master block = 291
Invoice wise receiveable amount is as follows
Invoice No , receivable amount , Received amount
10, 196 , 0 20 , 95 , 0 30 , 54 , 0
Result should be as follows:
Invoice No , receivable amount , Received amount
10, 196, 196 20 , 95 , 95 30 , 54, 0
Received amount field should be distributed according to the receivable amount when recevied amount = cheque amount then remaining will be 0.
Required to generate report to total sale dollar amount by combining information from T1 and T2 (matching with item_no). Rules are a)Formula is Sales_Number*Sale_price b)Choose the earliest sale record to latest by Sales_Date with the sum of Sales_Number is less or equal the Total_Sales_Number from T1. c)If the sum of Sales_Number is less than the Total_Sales_Number from T1, then the use a fixed price for all items, say $10 d)If a item is not in T2 then use $10 for the price
For example, item_no 1: Total sale dollar amount = 20*$15+30*$15+(60-20-30)*$10
item_no 2: Total sale dollar amount = 40*$16+(50-40)*$18 item_no 3: Total sale dollar amount = 5*$20 item_no 4: Total sale dollar amount = 20*$10
The current logic is done by using cursor. Can this be done without cursor using such as analytical statements? The Oracle DB is 9i.
We have a front end that is polling the database for some set of data.That set of data is returned by opening a ref cursor and passing it back to the calling environment.Now the problem they also want the count of total number of records that will be fetched by my select statement.One option is execute the select statement once ,get the count and pass it.But in that case i will be executuing the query twice once for count other time while openimng for the ref cursor .
Now, i want to count quantity follow slip_no and merchandise.
Example: Merchandise :2501B002CA have 8 slip with quantity is 12 and 5 slip with quantity is 16. Merchandise: 2501B001CA have 6 slip with quantity is 12 and 7 slip with quantity is 16.
I have 2 blocks named emp,emp1 those are DB's Blocks and empno, ename, sal in EMP block and sal, sum(sal) are in EMP1 block, i set the property for sum is summarized block is: EMP1 and item is SAL, i want display sum(sal), but not display when i click execute query.
I'm getting trouble in getting the sum of all the product's prize present in the form fields of invoice form. For example, I user bought 2 products so I want to get there prize sum in the total box. I first want that I've QUANTITY, DISCOUNT and SELLING PRIZE.
If I multiply Quantity with Selling Prize then I gets the result in Product and Quantity Total Box. However, Now I want to add discount option in it. Means if user is providing 10% discount to his/her customer then Quantity * Selling Prize - Discount% becomes a result in product's solution final prize box.
Here is the pic..
Look...Now here..I've added 22 in quantity.. now if I'll insert 10% in discount then the total will comes in Amount Display Box.
I'm currently using this coding on on Prize Box.. :SP_PRODUCT_PTOTAL := NVL(:SP_PRODUCT_QUANTITY,0) * NVL(:SP_PRODUCT_PRIZE,0) * NVL(:SP_PRODUCT_DST,0) / 100;
I have created a custom form which fetches certain records. There is a column called invoice_create_flag which is check box. By default when we query this form, value of check box is 'Y'. Another column is Amount.
Initially when form is called, all the records are selected. Hence it should show the total of all the records. Now If the users unchecks any record, System should deduct the amount of that particular record from the total amount.
I am working on form which consist of two block, now i need to know total record in detail block, but in form structure i have multiple details entry aginst 1 master entry and after going for next master entry the details of privious master entry are going for posting that's why i am unable to use the currnt_record function. function to retrive the total number of records in details tab.
In my Folder Form i have 6 Total Fields(SUM) , when i press anyone of these Total Filed, to move Right Or Left i got an error like this "frm-40733 pl/sql built-in set_group_char_cell failed."
i have one project about school system.there is one column of total marks.and other one is position column.i want a trigger that system genrate the position against total marks. problem is this when total marks become equal for example 101 and 101 than position also same.but dont now what a trigger i write for this.here some example
if total marks 100 than position is 1stand if total marks 99 than position is 2ndbut third person is also same number in total marks column i mean 99 than in position column must write the 2nd
I need to put amount '0' if the row exist but has no amount in my "where " conditions. the orginal commad is :
select t.aaa, count (t.bbb), sum (t.ccc) from nrb t where t.vvv IN ('3','4','5','6','D','E','F') and t.ddd like '50%' and t.eee >= TO_DATE('2012/03/21','YYYY/MM/DD') and t.eee <= TO_DATE('2012/07/21','YYYY/MM/DD') group by t.aaa order by t.aaa
and the result is : "result" tab in excel atached file.i need this result: "result 2" tab in excel atached file.
I need to get payment amount. For example i have one payment for 3 invoices.I need to show in my report for this payment 3 invoices:
invoice_number, invoice_amount, payment_amount.
Total payment is $10,000. Invoice A: $5,000 Invoice B: $5,000 Invoice C: $5,000 So, for Invoice A payment is 3,000$, for Invoice B payment is 2,000$, for Invoice C payment is 5,000$.
This is that i need to get.In action payment amounts are after withholding tax and i need to get amount before.
i want to get balanced amount based on max(suid ).
my query is
create or replace procedure prc_stk_upd_pur(v_comp_suid in i_purchase_h.pih_company_suid%type, v_area_suid in i_purchase_h.pih_area_suid%type, v_invoice_dt in i_purchase_h.pih_invoice_date%type, v_pih_suid in i_purchase_h.pih_suid%type, v_type in i_purchase_h.pih_type%type) is [code]......
my output is SEFF_SUIDSEFF_INV_DATESEFF_LOT_SUIDSEFF_LOC_SUIDSEFF_TRAN_SUIDSEFF_TRAN_TYPESEFF_COMP_SUIDSEFF_AREA_SUIDSEFF_STOCK_INSEFF_STOCK_OUTSEFF_CURRENT_STOCKCREATE_USERCREATE_TIMESEFF_RATE_USDSEFF_RATE_LCURNSEFF_PID_SUID 1121411/29/20121317151346LP11115720.00020.000SYSTEM29-NOV-12 06.53.45.000000 PM116.14107665.30601382 2121511/29/20121317151346LP11115755.00055.000SYSTEM29-NOV-12 06.53.45.000000 PM116.14097665.30001383 3121611/29/20121317151346LP11115730.00030.000SYSTEM29-NOV-12 06.53.45.000000 PM0.440729.08401384
my output should come SEFF_SUIDSEFF_INV_DATESEFF_LOT_SUIDSEFF_LOC_SUIDSEFF_TRAN_SUIDSEFF_TRAN_TYPESEFF_COMP_SUIDSEFF_AREA_SUIDSEFF_STOCK_INSEFF_STOCK_OUTSEFF_CURRENT_STOCKCREATE_USERCREATE_TIMESEFF_RATE_USDSEFF_RATE_LCURNSEFF_PID_SUID 1121411/29/20121317151346LP11115720.00020.000SYSTEM29-NOV-12 06.53.45.000000 PM116.14107665.30601382 2121511/29/20121317151346LP11115755.00075.000SYSTEM29-NOV-12 06.53.45.000000 PM116.14097665.30001383 3121611/29/20121317151346LP11115730.000105.000SYSTEM29-NOV-12 06.53.45.000000 PM0.440729.08401384
I have oracle 11gr2 database on linux os. It's total sga size is 500mb only. Now, if uses wants read the 1gb of data from database, then there is no sufficient memory in buffer cache. so how it will works. the transaction will get successful or it will fail.And i have another doubt, does oracle can read the data from memory only or it can also read directly from disk.
I want to convert an amount value in 99,999,999,990.99 format without using TO_CHAR function. I was trying to use regex. Is there any other function through which I would be able to do this?
Begin insert into employee_rev values(111, 'DEC-09', '31-DEC-2009', '01-APR-2009', 1300); insert into employee_rev values(111, 'JAN-10', '31-JAN-2010', '01-APR-2009', 1000); insert into employee_rev values(111, 'FEB-10', '28-FEB-2010', '01-APR-2009', 800); insert into employee_rev values(111, 'MAR-10', '31-MAR-2010', '01-APR-2009', 1000); insert into employee_rev values(111, 'APR-10', '30-APR-2010', '01-APR-2010', 1000); insert into employee_rev values(111, 'MAY-10', '31-MAY-2010', '01-APR-2010', 1100); insert into employee_rev values(111, 'JUN-10', '30-JUN-2010', '01-APR-2010', 2100); End;
I also need a YTD (Year to Date) field at the last which is sum of current month revenue_amt and sum(revenue_amt) for previous months for a particular financial_year_date.
The output should be:
Person_ID Month End Date Year Date Rev YTD 111 Dec-09 31-Dec-09 1-Apr-09 1300 1300 111 Jan-10 31-Jan-10 1-Apr-09 1000 2300 111 Feb-10 28-Feb-10 1-Apr-09 800 3100 111 Mar-10 31-Mar-10 1-Apr-09 1000 4100 111 Apr-10 30-Apr-10 1-Apr-10 1000 1000--change in financial year 111 May-10 31-May-10 1-Apr-10 1100 2100 111 Jun-10 30-Jun-10 1-Apr-10 2100 4200
I guess this should be achievable using some analytical functions, but I am unable to get the desired output.
SELECT DISTINCT opr, CAST (distinctcount AS REAL) * 0.02 AS total, distinctcount FROM ( SELECT DISTINCT opr, COUNT (*) AS distinctcount FROM out WHERE code = '22' AND timestamp LIKE '201303%' GROUP BY opr)
I would like this value 'distinctcount' to be multiplied with different amount for period January till June and from June to December. For instance for period (January till June) to be multiplied with 0.02, for period (June to December) to be multiplied with 0.03.
+ Oracle 11g + Centos 5.5 + I create many users by shell script (user01, user02, user03 ..... user0n) + How can I connect all user to Oracle database in Centos (may be create connect.sh) - command line env ? ...... // user01 , user02 ... ---===> connect Oracles ? My idea: using fork to create multi sqlplus to connect but it cant o_0
If all users can connect to Orcl db, I can count real user connections.
extract a huge amount of data from a couple of views... the problem is that they want it in TXT files with fixed record length. There will be like 6 files, for a total amount of about 10GB.
export those tables in the fastest possible way? If I'm not mistaken exp and expdp can't create txt files, so do I really need to use utl_file or spool?
I am creating 5 dbms_job at run time in side a stored procedure.But when I execute that procedure, all the job get 100%cpu and as a result other process does not get response. so my question is can we limit the dbms_job to use a defined amount of cpu%.
I want to adjust 2900 against certain amount from table on fifo basis.
DROP TABLE ABC CREATE TABLE ABC(ID NUMBER PRIMARY KEY,AMT NUMBER); INSERT INTO ABC VALUES(1,1000); INSERT INTO ABC VALUES(2,2000); INSERT INTO ABC VALUES(3,3000);
Can i do it using SQL. I know that it can be done using PL/SQL but i just wanted to confirm if its possible using SQL.
I'm working on a project and I can't figure out the procedure I will need to use. I've got a sysdate field in my "Calls" table which generates a call date + time, however I need to insert a severity level of the call after a certain amount of time, e.g. after 1 hour level turns from level 4 to level 3 and so forth until reaching level 1 after x amount of time. I know I'd need to put in an else if statement within this procedure I just can't work out how to do it with the sysdate field that has also been created.
A bit of info about the table, table name = calls, column 1 = date_time and column 2 is called severity_level