Bank transaction.

Sorry for the wrongly posted Question.

I have a table of Bank Transaction table. I want to display the account number Date wise sages deposits and withdrawals and closing balance.

CREATE TABLE bank_transaction

(acc_no VARCHAR2 (20 BYTE),

trn_dt DATE,

trn_type CHAR (1 BYTE),

trn_amt NUMBER (10.2)

);

/ * D - deposits and withdrawals-W * /.

INSERT INTO bank_transaction

VALUES (TO_DATE '100', ('2015-03-17 00:00:00 ',' ' YYYY-MM-DD HH24:MI:SS), HAS ', 6000);

INSERT INTO bank_transaction

VALUES (TO_DATE '100', ('2015-03-24 00:00:00 ',' YYYY-MM-DD HH24:MI:SS'), 'W', 5000);

INSERT INTO bank_transaction

VALUES (TO_DATE '100', ('2015-03-25 00:00:00 ',' ' YYYY-MM-DD HH24:MI:SS), HAS ', 10000);

INSERT INTO bank_transaction

VALUES (TO_DATE '100', ('2015-03-25 00:00:00 ',' YYYY-MM-DD HH24:MI:SS'), 'W', 5000);

INSERT INTO bank_transaction

VALUES (TO_DATE '101', ('2015-03-17 00:00:00 ',' ' YYYY-MM-DD HH24:MI:SS), HAS ', 10000);

INSERT INTO bank_transaction

VALUES (TO_DATE '101', ('2015-03-24 00:00:00 ',' YYYY-MM-DD HH24:MI:SS'), 'W', 5000);

INSERT INTO bank_transaction

VALUES (TO_DATE '101', ('2015-03-25 00:00:00 ',' ' YYYY-MM-DD HH24:MI:SS), HAS ', 5000);

INSERT INTO bank_transaction

VALUES (TO_DATE '101', ('2015-03-25 00:00:00 ',' YYYY-MM-DD HH24:MI:SS'), 'W', 1500);

I want to display data like that.

Account no.: 100

Trn_dt withdrawal deposit closing ball

17-mar-2015 6000 6000

24-mar-2015 5000-1000

25-mar-2015 10000 5000-6000

Account no.: 101

17-mar-2015 10000 10000

24-mar-2015 5000 5000

25-mar-2015 5000 1500 8500

Another way: (check if it really works for all cases of your example)

----

WITH dataset

AS (SELECT acc_no,

trn_dt,

trn_type,

CASE WHEN trn_type = ' THEN trn_amt END deposit.

CASE WHEN trn_type = 'W' THEN trn_amt END withdrawl

OF bank_transaction).

penultimate_set

AS (SELECT ACC_NO,

TRN_DT,

MAX (TRN_TYPE) OVER (PARTITION BY acc_no, trn_dt) trn_type,.

MAX (DEPOSIT) OVER (PARTITION BY acc_no, trn_dt) deposit.

MAX (withdrawal) OVER (PARTITION BY acc_no, trn_dt) WITHDRAWAL.

SUM (NVL (deposit, 0) - NVL (withdrawal, 0))

COURSES (PARTITION BY acc_no ORDER BY acc_no, trn_dt)

final_sum

Of THE dataset)

SELECT DISTINCT ACC_NO, TRN_DT, DEPOSIT, WITHDRAWAL, FINAL_SUM

OF penultimate_set

ORDER BY 1, 2

Output:

ACC_NO TRN_DT DEPOSIT WITHDRAWL FINAL_SUM
100 17/03/2015 6000 6000
100 24/03/2015 5000 1000
100 25/03/2015 10000 5000 6000
101 17/03/2015 10000 10000
101 24/03/2015 5000 5000
101 25/03/2015 5000 1500 8500

See you soon,.

Manik.

Tags: Database

Similar Questions

  • Why do I suddenly had a .qif with bank transaction file appear on my desktop!

    Why do I suddenly had a .qif with bank transaction file appear on my desktop today that were not there when I turned it off last night

    Hello

    1. have you made changes on the computer before this problem?

    2 are you able to open these files before, have you seen this message before popup on your computer?

    3. is there someone else your computer?

     

    The. QIF file is and ASCII text file. While you can view and edit the file in any text editor, be very careful as the format of the file and the order of the items in the file are essential for the proper execution of the file.

    NOTE : If the files are reappears or multiply on its own, so I recommend you to run the Microsoft Safety Scanner to remove all viruses in the computer that could create this file. Viruses are known to come. QIF file format. I suggest you to not open files if you are not sure about this and rather wait for the Microsoft Safety Scanner complete to ensure that it is not virus. Once the analysis is complete and the threat of virus cleared so you can view the file. If you think that the file is not linked, then you can remove the same.

    Run the Microsoft Safety Scanner and check if that helps resolve the issue.

    Microsoft Safety Scanner:
    http://www.microsoft.com/security/scanner/en-us/default.aspx

    Note: The Microsoft Safety Scanner ends 10 days after being downloaded. To restart a scan with the latest definitions of anti-malware, download and run the Microsoft Safety Scanner again.
    Note : the data files that are infected can be cleaned by removing the file completely, which means there is a risk of data loss

    Also try to perform a clean boot and check.

    How to solve the problem by running the clean boot in Windows Vista: http://support.microsoft.com/kb/929135 
    Note: once you have completed troubleshooting, perform the steps from step 7: to reset the computer as usual

  • When Mozilla online banking does not permit me to see the details of a transaction so that Internet Explorer will allow it. Mozilla has been done, but not now.

    I do my banking online with Bank of America, usually using Mozilla Firefox. Recently I noticed when I clicked on a banking transaction to see the "details" or print only this particular operation, it only allows me to see the details.

    Previously, whenever I clicked on a transaction, to see the image of a control I wrote for example, he always brought to the top of an image of the cheque. Now, he won't do it.

    If I use Internet Explorer, I can click on a specific bank transaction and see the details, exactly how I used to be able to do this with Mozilla Firefox.

    Therefore, the problem is with Mozilla and not the website of Bank of America, right?

    The suggestion to disable Adblock 2.4... "worked. "He solved my problem... Thanks a lot guys... problem solved with a click of the mouse. I can't tell you how much I appreciate the help... the technical support worked! Problem solved!

  • Microsoft Money 2007 no longer accepts my Bank OFX files

    Until July 1, each time I downloaded the money banking transactions or statements, money agreed that OFX files but since then I could not get the file downloaded in the program money. I know that MS can't stand money now so I'm trying to find the answer elsewhere...
    My magazine "L'Officiel Windows" gave me the opportunity to try Microsoft Answers

    Hi kcnhoj,

    The problem that you have posted here is related to Microsoft Money and it would be better in the community of Microsoft Money. Then I suggest you to post the question on the following link.

    http://social.Microsoft.com/forums/en/money/threads

  • Need help with export of Bank to the sunset of MS Money.

    I can't export my bank transactions in Sunset MS Money?

    This allows to work with MS Money.

    I now MS Money sunset and Windows 7 IE9. a pop up asking if I want to save download or save as. BUT does not save.

    Any help would be appreciated

    Hi H.Johns,

    The question you posted would be better suited in the Microsoft Money Forums. I would recommend posting your query in the Forums of Money.

     

    Microsoft Money Forum

    http://social.Microsoft.com/forums/is/money/threads

    I hope this helps.

  • banking on surface is it safe

    I have the RT Surface and wonder if it is safe to do my banking online

    Hi Shelby,

    You use Internet Explorer or any apps to make banking transactions online?

    As sure as the use of all other PCs.

    In order to ensure that an online transaction is secure, look for the following text:

    The web address begins with HTTPS prefix. The "S" is important because it means that a protocol called Secure Sockets Layer (SSL) encryption is used to connect to a web server. The prefix HTTP (without the "S") means that encryption is not used, and the transaction is less secure.

    If you receive a message in the Notification bar telling you that some content is not secured, then displays the webpage content using both HTTP and HTTPS web server connections. HTTP (without the "S") transactions is not sure.

    A lock icon appears on the right side of the address bar. Click on the padlock icon to view the certificate used to encrypt the Web page. The certificate identifies the certification authority that issued, dates it is valid and the server, with which you are communicating. If something looks wrong in information, contact the sender to confirm the validity of the certificate.

    Protect yourself with Internet Explorer 10
    http://Windows.Microsoft.com/en-in/Windows-8/help-protect-yourself-IE-10

    Use the Tracking Protection in Internet Explorer
    http://Windows.Microsoft.com/en-us/Internet-Explorer/use-tracking-protection#IE=IE-10

    SmartScreen filter: FAQ
    http://Windows.Microsoft.com/en-in/Internet-Explorer/use-SmartScreen-filter#IE=IE-10


    Six rules for safer online financial transactions
    http://www.Microsoft.com/security/online-privacy/finances-rules.aspx

    Let us know if it helps.  If you have any questions, please answer, we will be happy to help you.

  • Steps for automatic bank reconciliation

    I want to use the functionality of automatic reconciliation of bank reconciliation, but face some problems. Here are the steps I performed.

    Step 1-

    Created a class of reception with creation method-manual method - no. discount discount, clearance method - by automatic compensation

    Step 2-

    Create an invoice and receipt

    Step 3-

    Run the transactions available to the reconciliation report. The transaction created above does not appear in the report

    Step 4-

    Manually load the bank statement

    Step 5-

    Run the auto-reconciliation program

    Step 6-

    Asked the bank statement but still transaction remained unreconciled.

    Grateful if someone can help. Are there steps that I missed or extra parameters?

    (I used the bank reconciliation whitepaper r12 Oracle through a case study)

    Thank you

    You must set the bank transaction codes (mandatory configuration) in order to run autoreconciliation.

    If you create a manual bank statement in 11i and do not give the Transaction codes, you can still semi-auto, however, R12, you can not semiautomatic without Transaction codes on the statement line.

  • Help please - SUMIF formula?

    I have been using the model of budget numbers.  On Page 1, I have the summary, and my transactions are in two other tabs (a credit card) and one for the Bank.  SUMIF using I can get the category to display the total of one of the sheets, but I can't work on the formula if I want to use the amounts of the credit card and Bank at the same time sheets (hope that makes sense).  IE I want to have my grocery category to indicate the total amount spent for the credit card and the Bank.   Absolute beginner to this and my Mathematics studies completed years... I just try and follow the logical path.  Thanks in advance for any help

    Hi computermum,.

    If we look at the two personal Budget in 3 numbers,

    Formula in C2 (fill down)

    SUMIF(Transactions Credit Card::Transactions::C,A2,Transactions Credit Card::Transactions::$D) + SUMIF(Transactions Bank::Transactions::C,A2,Transactions Bank::Transactions::D) =

    Which use SUMIF for two sheets of Transactions (credit card and Bank).

    Built to illustrate:

    = SUMIF(Transactions Credit Card::Transactions::C,A2,Transactions Credit Card::Transactions::$D) (the original, adapted form for the name of the new 'Transactions credit card' journal)

    + (plus)

    SUMIF (Transactions Bank::Transactions:C, A2, Transactions Bank::Transactions:D) (SUMIF review for the journal of banking)

    Substitute member of the worksheet names that you are using.

    Note that my values in the column (column C) actual spending on the Budget sheet are double values in the model. I have been duplicated and rename the original Transactions.

    Kind regards

    Ian.

  • After expiry of the period of freeAVG, Windows security shows virus protection is disabled and does not change if I click on "update" Please help.

    My AVG free Internet security 2013 just expire and alert Security informed Windows that I have no protection against the virus.
    In another finding, I note that it says that you should not have more than one market protection, they will conflict and slow down the computer. I thought I had with Windows and Firefox. My TalkTalk broadband services provider, may also provide protection. How can I get it sorted as soon as possible with a free antivirus? I am a novice and the grandmother and worry about safety online. Thank you.

    No Trusteer Raport is completely different and concerns authorizing bank transactions.

    Also note Trusteer post report when overwhelmed sometimes is involved in Firefox crashes so if you have accidents are trying first of all the update and then if necessary uninstall Trusteer.

  • Why private browsing is better than fair compensation history every day?

    I heard you can do your banking transactions online and other financial activities in private browsing mode. I always clear history when I turn off the computer anyway. And get private browsing to accept my places previously marked with a bookmark has failed. I can re-favorite of private browsing, of course. But I just wondered if it is really necessary, or more for people with computers on the network, or shared computers?

    You can not get to my computer - troubleshooting information. I use the Windows 7 operating system and the latest version of Mozilla Firefox.

    Note that in private browsing mode disk cache is not used

    Firefox also disables the disk cache if you use "Clear history of Firefox closing" to clear the cache of navigation.

    So if you really want to erase all personal data of all day isn't much of a difference.

    Private browsing mode only records data on the disk, but it keeps in memory for the current session.

  • some SMS not delivered on my iphone 6

    I use for security and internet banking, the Bank sends a sms with a TAC number key to complete the bank transaction. I was wondering how to unlock the settings on my iphpne 6 who stop receiving these sms. I have no problems of reception of these on an Android smartphone.

    Hello anil54,

    If you don't receive your bank SMS text messages, take a look at the troubleshooting steps in this article.  Make sure that your bank details are in your Contact app and it is not on the blocked list.  Click on the link below for more details.  I've highlighted a few key points for you.

    If you can't send or receive messages on your iPhone, iPad or iPod touch


    1. If your messages are not sent or you do not receive the messages

      Check your details:

    • Make sure you use the right phone number or email address of the contact.
    • Go to settings > Messages > blocked and make sure that the contact is not on your list of blocking.

    Restart your device and check for updates

    1. Restart your device.
    2. Looking for a carrier settings update.
    3. Looking for an updated software iOS.

    Take care

  • How to stop Lenovo desktop computer to be hacked

    I have a Lenova desktop computer, purchased of opportunity. Operating system is Windows XP Proffesional. Before that I had a HP Slimline desktop computer and two computers were hacked: I poured the HP only to find that opportunity has also been invaded. The modem is a wireless network - but I couldn't have my own security password entry so I gave up and just to 'wired' left if you know what I mean.
    On the two browser is Firefox. Store-bought Kaspersky Anti-virus, installed and doesn't seem to help at all and always reported 'normal' I can't understand what I'm doing wrong. I know who did this, although too much to do right now. I called the international police and the police local, or even answer. I think that maybe because I never do / banking transactions online and there was no financial loss / nor imply an online business or personal website.

    I'm afraid of that person. My technical knowledge of computers is lacking.

    Hello

    Even if your computer uses a wired connection, WiFi is always available from
    the router for the hacker still has access.

    Check with the support of the manufacturer of your router and check with their documentation online and
    forums. You want to reset the settings of the router security, SID (name) and password.

    Wireless network general recommendations of security for individuals
    http://theillustratednetwork.MVPs.org/LAN/SoHoWirelessSecurity.html

    Introduction to wireless network security
    http://netsecurity.about.com/od/Hackertools/a/aa072004b.htm

    10 tips for Wireless Home Network Security
    http://compnetworking.about.com/od/wirelesssecurity/TP/wifisecurity.htm

    Securing your wireless network
    http://www.practicallynetworked.com/support/wireless_secure.htm

    How to secure your router Linksys Wireless - similar can be used for other routers
    http://www.pctipguys.com/index.php?option=com_content&task=view&ID=57&Itemid=36

    What are the different wireless network security methods?
    http://windowshelp.Microsoft.com/Windows/en-us/help/b385cc8a-AF25-489e-a82e-decf6df26b681033.mspx#EZB

    Hope these helps.

  • Printing of documents on the Internet

    I have a HP Photosmart C7280 All In One Printer that will not print from some web sites... for example: print not boarding the Air Canada, revenues of the Kraft Web site, Web site online banking transaction confirmation.  Operating system is Windows Vista 32-bit, IE 9.

    Thank you!!  I had already tried some suggested solutions by the spent with not luck... tried the suggestion to turn off protected mode in the options of internet security... did it and I am now able to print from two internet sites that I was unable to print from and hope for successful even when I need to print boarding pass on the Air Canada website.  Thank you, thank you thank you!  It is a very good site.  Definitely will use it again when and if a problem occurs.

  • Data display

    Hello

    I have a table of Bank Transaction table. I want to display the data account no. rates wise sages Date and withdrawals and the closing balance.

    CREATE TABLE bank_transaction

    (acc_no VARCHAR2 (20 BYTE),

    trn_dt DATE,

    trn_type CHAR (1 BYTE),

    sale NUMBER (10.2)

    );

    I want to display data like that.

    Account no.: 100

    Trn_dt flow Withdrawl closed ball

    01-apr-2014 5000 5000

    02-Apr-2014 1000-4000

    03 Apr-2014 2000-7000

    Account no.: 101

    Trn_dt flow Withdrawl closed ball

    01-apr-2014 10000 10000

    02-Apr-2014 1000-9000

    03 Apr-2014 2000-11000.

    I tried like this.

    DECLARE

    CURSOR c1 IS

    SELECT DISTINCT trn_dt FROM b_trn_t ORDER BY acc_no, acc_no, trn_dt;

    CURSOR c2 (VARCHAR, p_trn_dt DATE p_acc_no) IS SELECT acc_no, TRUNC (trn_dt) trn_dt, trn_type, balance OF the b_trn_t

    WHERE acc_no = p_acc_no AND trn_dt = p_trn_dt ORDER BY acc_no, trn_dt;

    v_cr_amt NUMBER: = 0;

    v_db_amt NUMBER: = 0;

    v_clos_bal NUMBER: = 0;

    v_acc_no varchar (12);

    v_trn_dt DATE;

    BEGIN

    I'm IN c1 LOOP

    IF v_acc_no IS NULL THEN

    Dbms_output.put_line (i.acc_no);

    v_acc_no: = i.acc_no;

    ELSIF v_acc_no <>i.acc_no THEN

    v_acc_no: = i.acc_no;

    v_cr_amt: = 0;

    v_db_amt: = 0;

    v_clos_bal: = 0;

    Dbms_output.put_line (i.acc_no);

    END IF;

    FOR j IN c2 (i.acc_no, i.trn_dt) LOOP

    IF j.trn_type = 'C' THEN

    v_cr_amt: = v_cr_amt + j.balance;

    ON THE OTHER

    v_db_amt: = j.balance - v_db_amt;

    END IF;

    END LOOP;

    v_clos_bal: = v_cr_amt-v_db_amt;

    Dbms_output.put_line(i.trn_dt ||) ' D ' || v_cr_amt | ' C ' || v_db_amt | "CLOS BALL | v_clos_bal);

    END LOOP;

    END;

    Hello

    This request obtains all of the information you want:

    SELECT acc_no

    TRUNC (trn_dt) AS trn_dt

    , SUM (CASE WHEN trn_type = ' THEN trn_amt END) filing form

    SUM (CASE WHEN trn_type = 'W' THEN trn_amt END) AS witthdrawal

    SUM (SUM (CASE

    WHEN trn_type = ' THEN trn_amt

    WHEN trn_type = 'W' THEN - trn_amt

    END

    )

    ) OVER (PARTITION BY acc_no

    ORDER BY TRUNC (trn_dt)

    ) AS closing_bal

    OF bank_transaction

    GROUP BY acc_no, TRUNC (trn_dt)

    ORDER BY acc_no, TRUNC (trn_dt)

    ;

    The format is not quite what you asked:

    ACC_NO TRN_DT DEPOSIT WITTHDRAWAL CLOSING_BAL

    -------------------- ----------- ------- ----------- -----------

    100 17 March 2015 6000 6000

    100 24 March 2015 5000 1000

    100 March 25, 2015 10000 5000-6000

    101 17 March 2015 10000 10000

    101 24 March 2015 5000 5000

    101 25 March 2015 5000 1500 8500

    If you are using PL/SQL, to get the results in the exact format you need should be easy.

    Using only SQL, you can get the acc_no on a separate line using GROUP BY GROUPING SETS.  You can use CASES and the GROUPING function to show only the acc_no on some lines and all, but acc_no on others.  May also get the acc_no and the trn_dt in the same column.  (You will need to explicitly call TO_CHAR for this).

    GROUP BY GROUPING SETS can also get a header line after the first acc_no.  If the VARCHAR2 headers are part of the result set, you will need to convert to strings, the total NUMBER of columns using TO_CHAR.

    Maybe some of you have done proof of formatting is not important to you.

  • PrestaShop integration with Adobe Muse. All advice?

    Hi, my question is simple. Is it possible to integrate Prestashop websites created with Adobe Muse?

    As you know Prestashop is an application to be installed on the server where you have hosted your page, which allows you to create a shop to sell your products, management of categories, pictures, catalogues, etc. and you to sell your products via credit card, etc.

    I wonder if can I enter a Web site created in Muse, without having to get a model designed for Prestashop Prestashop.

    Any advice on this subject?

    I would appreciate your help with this.

    See you soon

    Personally I have not tested the Prestashop integration, but yes, this application needs to be installed. Shopping function will work with exported files of Prestashop, where Prestashop offers you the possibility to download exported files directly on your server. So you can do whatever it is, server or locally. All banking information must be configured in Prestashop. IBAN, swift details are no longer necessary because I believe because they are for offline end (banking transactions). You must set up an account of payment Gateway (those who are supported with Prestashop as Authorize.net etc.) within the parameters of the Prestashop module side.

    Model, menu etc. these integration components of layout as such use with shop module Prestashop will not work unless you're hardcode (write code and integrate with the source of the site page) them with the content of your page, because Prestashop includes its own theme where the purchasing function works.

    They have good documentation on how to things that you can reference:

    http://doc.PrestaShop.com/dashboard.action

    Payment gateway information:

    http://www.InMotionHosting.com/support/edu/PrestaShop-15/309-set-up-payment-gateway

    Thank you

    Sanjit

Maybe you are looking for