Total balance

W withdrawal

D - filing

Calculate the balance of each account



CREATE TABLE A ( ACC_NO NUMBER,COMP VARCHAR2(90), SAL NUMBER);




BEGIN
INSERT INTO A VALUES ( 10,'W',900);
INSERT INTO A VALUES ( 10,'W',1000);
INSERT INTO A VALUES ( 10,'D',200);
INSERT INTO A VALUES ( 10,'D',7800);
INSERT INTO A VALUES ( 12,'D',9000);
INSERT INTO A VALUES ( 12,'W',1000);
INSERT INTO A VALUES ( 12,'W',1000);
INSERT INTO A VALUES ( 12,'W',1000);
END;









I wrote the below query to achieve this. Any other simpler way?

with t as (
SELECT ACC_NO,SUM(SAL) as s,'D' as comp_name
FROM A
GROUP BY ACC_NO,COMP
HAVING COMP='D'
UNION
SELECT ACC_NO,SUM(SAL) as s,'W' as comp_name
FROM A
GROUP BY ACC_NO,COMP
HAVING COMP='W' ),
tt as (


select t.* ,
lead(s) over (partition by acc_no order by acc_no) r from t )




select sum(r - s) as tot_balance ,acc_no


from tt
group by acc_no

Hello

So, sometimes, you want to add sal altogether, and sometimes you want to subtract.  This sounds like a job for CASE.

Here's one way:

SELECT SUM (sal
* CASE comp
WHEN A ' THEN 1
WHEN 'W' THEN-1
END
) AS tot_balance
acc_no
A
GROUP BY acc_no
;

The UNION is good when you have to do something similar on different tables.  When you have to do something similar on different subsets of the same table, then the UNION is probably not the easiest or most efficient way.

Thanks for posting the CREATE TABLE and INSERT statements; It is very useful.

Tags: Database

Similar Questions

  • How to get the balance of an element value

    Hello

    I have a requirement to obtain related information with balance. I am able to read the information on the element except balance.how to get the value of the particular item balance.

    for the application-> transfer and process-> queries with trust-> value the month selected and chosen balances button and queries with the obtained item name break it down the value of the balance.

    These values I want in my query.i tried backend with calling package by passing parameters like the number of transfer, balance the id and date but iam getting value "0".

    IAM new to hrms, Please help me on how to get this balance of values

    Thank you

    Hello

    It is not very clear what you want to display in the form of balance for a given range of dates.

    It depends on how you have configured your balances and periods and balance which you are referring.

    The API allows for a given only date that matches the date earned.

    Say, for example, that you have a "basic salary" defined with a "Treatment period assignment to Date" dimension and feed of the element that corresponds to the base salary.

    "If you need get the 'wage base Total' (balance?) for the period February 1, 2015 ' to March 31, 2015", then you need get dates earned for payroll passes made during that period and call the package above with the appropriate settings.

    Another way is by querying the tables/views directly: you can use, for example - it's perhaps easier to your situation:

    Select sum (nvl (pbv.value, 0))

    of pay_balance_values_v the VB.

    where pbv.balance_name = 'base salary.

    and pbv.database_item_suffix = '_ASG_PTD. '

    and pbv.assignment_id =

    and pbv.effective_date between to_date (' 01/02/2015 ',' dd/mm/yyyy')

    and to_date (' 31/03/2015 ',' dd/mm/yyyy');

    Kind regards
    Rajen

  • How to find how much money remaining on an old map itunes

    So I have old itunes gift card I want to use it on my new iphone 6s, the card has already been used, and that's what he told me on the itunes app. How to find how much money left on my card? And how I can buy songs with the rest of the money?

    Sign in to your Apple ID. Your balance if any will appear as a credit on your account. I'm not aware of a way to see the balance of a gift card special, only your total balance. See your credit balance - Apple Support iTunes

    Buy a song:

    1. Open iTunes
    2. Search for the song you want or search by genre or top of page graphics
    3. Find a song you like (you can listen to samples of songs by attaching masking tape or by clicking on the play icon.) "It's on the cover of the album or the song number).
    4. Click or tap on the purchase price
    5. If you have a credit it will deduct the money from the

    Preview below the play button example.

    -AJ

  • Problem with the update in Microsoft money 2005 UK currency

    Having used MONEY 2005 UK for several years, with Sterling accounts and the Euro appearing in this document, with Total balance of the account and the final balance of each account that is displayed in euros, it's still works fine, no problem! but the problem is that before a couple of years, there is an update manually or automatically in the exchange rate Euro / Sterling. but it is currently unavailable, and the exchange rate remains as a very old... So I need to know how to do the updates of this exchange rate in my MONEY 2005 UK on my laptop running Windows 7 Home Premium Service Pack 1... Thanks in advance for your answer :-)

    Hello

    For questions of Microsoft Money you please directly post the Forum money from Microsoft.

    http://social.Microsoft.com/forums/en-us/home?Forum=money

    See you soon.

  • Project of Siena and probate real estate - Yes, estates - applications

    Hello. For more than two years, I tried to get PayPal, regional banks, national banks - name you - interested in developing a means by which individuals (by choice, become a widower, other circumstances) have no executors of their wills - can be paid balances of the debts to their death automatically. I subscribe to Deathswitch for more than two years, and Deathswitch does not offer one service other than to inform people/institutions of your demise.

    Two years ago, I tried without success to get PayPal developers to challenge it professionals to consider the simple idea. If it would be possible for me to build an application with his own project, could someone familiar with the program let me know here? The level of complexity is perhaps too high or great with legal to perform obstacles. It would be 1) notification (like Deathswitch) an institution of your demise. 2) including as a 'pay Bill' to the Bank in which you regularly paid bills a separate account of the "total balance to death' new; and (3) automatic closing of the account, so that no one would use utilities, or to run credit cards fees - or fraudulently use anything - it on your behalf.

    Thanks as always for all help.

    (IF ANY APPLICATION OR SOFTWARE PROGRAM ADDRESSING POST-MORTEM BILL-PAY/CLOSURE OF ACCOUNT EXISTS, PLEASE POST HERE.)

    Hello

    From your description, I understand that you develop an application that can pay off balances in debt to the death of customer automatically.

    To better help on this, please contact application Windows development team.

    http://social.msdn.Microsoft.com/forums/windowsapps/en-us/home?category=windowsapps

    The backend (post-mortem details) application, you can search by the windows store.

    Hope that the information provided is useful.

  • null process

    Hello

    I generation generate data like this, for example,.
    (see below)

    There is nothing in Gen and Alias, so I check to dimension build property nullprocessing and hoping that it will be responsible for me, however, I got error saying wrong parent.  Any pointer would appreciate

    Alias aliases1, Gen1, GEN2 accounts, accounts ALIAS2, GEN3 accounts, accounts ALIAS3, GEN4 accounts, accounts ALIAS4, accounts GEN5, GEN6 of accounts, ALIAS5 accounts, accounts ALIAS6, accounts GEN7, accounts ALIAS7, accounts GEN8, accounts accounts, accounts ALIAS8

    NULL NULL NULL NULL, cash and cash equivalents NULL operation active assets Total balance sheet accounts Cash account 10100 cash NULL NULL NULL

    NULL NULL NULL active assets Total balance sheet accounts circulating cash NULL NULL operating Cash NULL 10101 Cash Conversion NULL NULL

    Accounts balance sheet Total NULL NULL NULL active short term assets cash and cash equivalents operating cash NULL NULL account disbursement 10112 NULL NULL NULL

    Accounts active balance Total NULL NULL active short term NULL NULL, cash and cash equivalents NULL payroll Cash NULL 10120 payroll Cash account NULL NULL

    For some reason, you get a null text instead of NULL values in the column. SHAT is the SQL that generates what it looks like? I bet he uses a literal null instead of Null itself.   Apart from the setting of the SQL would be to go to the State of charge and for all columns, click the General propertied of field and enter to replace NULL without anything check the box for whole word

  • Rolling up the orders from customers at the level of companies

    I have clients who want to secure areas that lists the products they have ordered but were purchased by various employees of their companies. Employees connect, make the purchase but cannot see their own purchases. The supervisor company wants to open a secure session, see all orders and the status of payment for each, in effect, a dashboard of their purchase total, balances and payments to date. I can't determine if there is a way for these order data through mine through multiple clients that are part of this society. Any thoughts on this would be helpful.

    Hi Neil

    This scenario should be achieved using module_data and liquid.

    Below are a few items that will help

    module_data | Developers of business catalyst

    odule_data http://docs.BusinessCatalyst.com/developers/Liquid/Consuming-APIs-in-the-Front-End-Using-m

    Introduction to liquid

    Silviu

  • Does anyone know how to fix a problem of calculation in a pdf file that is a financial spreadsheet?

    Currently I have a financial spreadsheet I had to create for my work.  One of the cells does not calculate correctly.  I need for the cell to use calculation Total - Total balance = balance.  I used abbreviations in the cell itself to the formula so I know this isn't the problem.  The poor figures will calculate in the cell.  I find that I have to delete the wrong number, and then in another cell.  Once I click in another cell that will fill out the right balance.  I would be fine with that, but my boss is not ok with having to perform additional steps.  Can someone help me?

    It sounds like a problem of calculation of field command. Access the form Edit mode - calculation order of field tasks - more - and make sure that the field of the Balance is under the other two fields in the list.

  • How to set up an installation of sick leave

    Hi all

    I need your help that how can I do the following configuration of sick leave process in Oracle pays according to the exercise program that some sick leaves are being the right to sick leave years next balances.

    1 employee that leave are maintained and carried on the basis of employee hire date anniversary year

    2 - leave per year allowance is 90 days, but the days and their respective deduction is logically divided into three following categories
    -Full time paid off - 15 days
    -Half paid - 30 days
    -Unpaid / No Pay - 45 days

    Note: We have only one type of absence - sick and its corresponding element

    3 - the sick leave report at the end of the anniversary date respective rental must be by the following breakdown
    -Full-time paid off - 0 to 15 days - according to the available balance
    -Half paid time off - 0 to 15 days - according to the available balance
    -No paid/not paid for - 0 days
    All carry them forward sick accumulates to the segment to pay next year many sick leaves which is annually complete payroll can only increase, while the other two logical segments would be update to its values of law

    Sick leave the ceiling
    Full pay - 90 days + 15 days
    Pay - 30 days
    No compensation - 45 days
    This means that the total balance of leave can have any employee is (90 + 15 + 30 + 45) 180 days

    I need your help to configure this as
    Sick leave accumulation Plan & fastformulas for the maintenance of the balance
    Deferral of sick leave on FastFaromulas
    Deductions of sick leave
    Deduction of sick leave for employee final settlement processes

    Waiting for your answers and assistance

    Kind regards
    Usher

    Hi Usher,

    If you want to assign the right to sick leave at the beginning of the year itself, probably you do not need exercise and postpone the formula Setup. Not the best, but what you can do is the following: -.

    1. create after four pieces of information.
    i. sick leave
    II. the sick leave FP (full payment)
    III. the sick leave HP (half paid)
    IV. leave (unpaid) NP
    PS bottom three might be indirect items.

    2. create three balances for over the last three elements and give initial feed (a time of installation only)

    3. employee apply only sick leave (the order in which accounr will be used would be fully paid--> paid half--> unpaid). You can write this in a quick formula of sick_leave_fast_formula or to the hook of the user.

    3. at the end of the year, run a program customized for rested / break the balance in accordance with the accrual accounting policy mentioned by you.

    Thank you
    Avinash

  • How to make a balance in numbers?

    For my control and Visa accounts I download a .csv file, and then add a column and want to create a running balance.  In Excel, you don't the formula and then fill down.  How do you get that number?

    Hi Lee,.

    The process is the same in number, enter the formula in the first line of the table non-en-tete, and then fill down.

    The kicker, of course, is 'What formula?' and the answer to that depends on the structure of your table.

    If the deposits and withdrawals are recorded in the same column (eg. (D) and is distinguished by withdrawals recorded in negative numbers and the initial balance is in cell D2, then the formula is

    = SUM(D$2:D2)

    Filled down, reference D$ 2 will remain sharp at D2, D2 reference (without the operator $) will point to the cell in the current row of column D, and the formula returns the total of all values in column D.

    If deposits and withdrawals are distinguished by being lists in separate columns (say d, withdrawals, deposits in E) all entered as positive numbers, then enter the opening as a deposit in D2 and use this formula:

    = SUM(D$2:D2)-SUM(E$2:E2)

    Each formula is entered in row 2 of the column that holds the balance running and filled until the end of the table.

    Kind regards

    Barry

  • How to get the total of the multiple products of cells

    I want to save my money on the balances of the hand for different days of the year and see if I can develop a trend and reduce my expenses. I can easily make a cell inside of my table that tells me how many I have a kind of money (20 of 5 cents, 9 $2, 3 50 $, etc.) for today (aid = Lookup), the day where I'm looking for my document. This can be used to show me a trend, however, if I want to do another column that keeps track of this total, so that I can use it as a reference to a line chart elsewhere.

    My problem is that when I want to many the last row of cells (filled with the types of currency) by their amounts (20, 9, 3), I have to do for each cell, and if I try to fill it, numbers changes the cells I want it multiply so that now the two amounts are multiplied, rather than the independent form and variable amount.

    My question is: which formula can be used to multiply each B1, C1, D1 etc. with the appropriate..., C2, B2 or B3 and C3... etc, so that I can fill and then also for other cells in column N.

    Hi Kasai,

    SUMPRODUCT is your friend here.

    The totals are in column N.

    N2 and filled down: = IF (COUNT(B2:M2)<>SUMPRODUCT($B$1:$M$1,$B2:$M2))

    The IF part removes the calculation of this row if no number has been involved in any of columns B to M.

    If everything has been entered, the IF condition returns FALSE and the calculation of SUMPRODUCT (in "BOLD") is done.

    I noticed that you included a piece of 20 cents in the list in the upper part, which has awakened my curiosity. Is this typo, or is it a country whose currency is denominated in "dollars" which is a coin circulating 20 cents worth?

    Kind regards

    Barry

  • LabVIEW communication balance ohaus

    Hello

    I'm working on labview 7.1 and I can't communicate properly with my balance (ohaus arc120).
    Pour-ins one communicate cable rs232 cross I made from a straight cable and a usb/rs232 adapter.

    When I recover data from the balance via the balance button print of, everything works, I have the right value.
    But when I command with the pc, I did not always signal. When I AI of the United Nations, the value that I receive is shouting. the number of bytes read is not constant and it y to framing errors: missing a portion of the value (ex: 2 of the 3 g 2 instead, 83 g) or tells me totally other chosen (special characters, letters...)

    More I don't get any signal if in my VI I do not repeat 7 times education write in a loop. Pour the tare weight is the same, I repeated the statement 5 times.
    Pour to succeed to write then read there text session of the Nations United visas pour write, keep my mouth shut, then if I opened a new Lira. If it is not written.

    I also tried release directly into rs232. I get good value in appyuant the button print, but I can't balance of promotion of the Commander not.

    I checked the settings of transmission, they are in.

    Can you help me?

    Thank you very much

    Kind regards

    Try this PIN for RS232 cable:

    Here are two cable configurations that will work with 9 pin and 25 PIN serial ports. You will notice that pins 2 and 3 are not crossed in the PIN 9 but are in line with 25. In any case the pins 5 and 6 must be short-circuited to the balance at the end of the cable. Only one type of cable will work with the two balances.
    Ohaus - AS017-09 part number used with AP, AS, C, CT, E, G, TG, I5, TP, TS, MB200, adventurer, Explorer, travel, Navigator and Scout.
    Cable - balance on PC
    (F) 9 pin to 9 pin (F)
    Balance PIN - to-pin PC
    PIN 2 (TXD) - to - PIN 2 (RXD)
    ) PIN 3 (RXD) - to - PIN 3 (TXD)
    PIN 7 (GND) - to - the PIN 5 (GND)
    For balances other adventurer pins 5 & 6 must be short-circuited together at the balance and NOT connected to the computer. It is not required in the balances of the adventurer.

  • The storage load balancing process

    We have a group of 4 members, total approximately 30 TB of space. In the past, we had a lot of volumes of 500 GB for ESX, after the installation of the ESXi5.1, we use higher volumes, about 1.5 TB. So there are a lot of changes in the storage pool. We find that the EQ is balancing of storage compared to 4 members as expected. We thought it was over two or three days agoo, but now he's balancing... then again for a couple of day all volumes are spread over 3 members, also, as expected, but he decides to charge storage it swings again... and again...  It is coming to an end sometimes?

    We have another group with 4 members and also the same amount of space, but it we do not use the 1.5 TB volumes again... here, we see that EQ is continuous storage load balancing pool.

    Im not worried yet :)), but whenever volumes are redestributing compared to members, it does not follow on some reconnects for ESX as the part of a volume can and will reside on another Member where on that time esx is not a connection to that session at that time.

    Hello René,.

    It will not be stuck in a loop.  Part of the balance to the maintenance of free space between the members.  So when several pages are written to a specific member, space balancing will create plans to move the blocks to the other members to free up space on this member.  It's an ongoing balancing act.  In addition, extended periods of heavy i/o load balancer Advanced Performance will swap pages in order to compensate for the latency between members.

    Kind regards

  • Load Balancing does not not on 2911

    Hello people,

    I have some difficulty to operate the Load Balance on my 2911.

    I have followed the editing on this site:

    http://www.Cisco.com/en/us/Tech/tk648/tk361/technologies_configuration_example09186a0080950834.shtml

    and APARENTLY it works, but not in reality, because I see packets using a NAT IPS bot thru, but when I check on the interfaces I see we're not receive / send anything.

    Background:

    G0/0, I have one ISP, other 1/G0, G0/2 my network.

    Building configuration...

    Current configuration: 6045 bytes

    !

    ! Last configuration change to 15:47:49 UTC Tuesday, January 28, 2014 by alan

    ! NVRAM config update at 14:32:59 UTC Tuesday, January 28, 2014 by alan

    ! NVRAM config update at 14:32:59 UTC Tuesday, January 28, 2014 by alan

    version 15.1

    horodateurs service debug datetime msec

    Log service timestamps datetime msec

    encryption password service

    !

    ROUTER1 hostname

    !

    boot-start-marker

    boot-end-marker

    !

    !

    logging buffered 51200 warnings

    !

    No aaa new-model

    !

    !

    No ipv6 cef

    IP source-route

    IP cef

    !

    !

    !

    !

    dhcp LAN_DHCP_POOL IP pool

    network 192.168.0.0 255.255.0.0

    default router 192.168.2.2

    domain g_bacon

    DNS 8.8.8.8 Server 208.67.222.222

    0 8 rental

    !

    !

    no ip domain search

    IP host ROUTER1 192.168.2.2

    8.8.8.8 IP name-server

    name-server IP 208.67.222.222

    IP-server names 8.8.4.4

    IP-server names 208.67.220.220

    !

    Authenticated MultiLink bundle-name Panel

    !

    !

    Crypto pki token removal timeout default 0

    !

    Crypto pki trustpoint TP-self-signed-2101532551

    enrollment selfsigned

    name of the object cn = IOS - Self - signed - certificate - 2101532551

    revocation checking no

    rsakeypair TP-self-signed-2101532551

    !

    !

    TP-self-signed-2101532551 crypto pki certificate chain

    certificate self-signed 01

    3082022B 30820194 02020101 300 D 0609 2A 864886 F70D0101 05050030 A0030201

    2 060355 04031326 494F532D 53656 C 66 2 AND 536967 6E65642D 43657274 31312F30

    69666963 32313031 35333235 6174652D 3531301E 32313137 OF 31323239 170 3131

    31335A 17 0D 323030 31303130 30303030 305A 3031 06035504 03132649 312F302D

    4F532D53 5369676E 656C662D 43 65727469 66696361 74652 32 31303135 65642D

    33323535 3130819F 300 D 0609 2A 864886 01050003, 818, 0030, 81890281 F70D0101

    8100DEA3 06574FDF B2B2113F 84A1EF39 9969F4D9 04131994 A3FCC466 D0328CCF

    B219F1AE A3DCC204 CD993BB2 F59C9A7F C251024E 382162 5 D9277CEB F1A575A5

    0356 C 896 A7A1BB48 8EA4CFF6 DA77B72C 9904A73B 6731A6E0 3004E5EA B44C1F7F

    5667496C 1E8E603D BE9B1AA1 1065E449 F6110C17 1A5FE3B9 3593BF87 96E14DEC

    010001A 3 53305130 1 130101 FF040530 030101FF 301F0603 0F060355 87FF0203

    551 2304 18301680 14E5F8C8 C30593C3 CEAB1874 F94F070B 9674F152 AD301D06

    03551D0E 04160414 E5F8C8C3 0593C3CE AB1874F9 4F070B96 74F152AD 300 D 0609

    2A 864886 F70D0101 A 05050003 81810092 51314, 50 EA812CDA AC97A8D1 2CA06BCC

    6FD5B4A6 DA888322 E2166AB4 0CF340BB E0407C95 584A1BDF 5DC3A6EE 2862E9CF

    7BF0C831 54F06ABF 011664 D 3 75269FF3 02D434BD 0FD15F32 EB34730C 47FE29D9

    7C2BBF9D 5BDB1D4F EEBFBED5 9B07450E 83DA57B2 1F296D0A 52D39A8F 6A 679244

    05C0924C F3FA9A05 53198E BDB28409

    quit smoking

    license udi pid CISCO2911/K9 sn FTX1553AJQU

    !

    !

    username privilege 15 secret 5 alan $1$ b6Jk$ 8iz3K3cTUgSZ.VePkKl5a.

    !

    redundancy

    !

    !

    !

    !

    !

    class-map correspondence-any PROHIBIDAS

    Protocol httpwww.facebook.comhost game «»

    Protocol httpwww.youtube.comhost game «»

    match Protocol http host 'www.pornotube.com.

    Protocol http host «www.xvideos.com» game

    match Protocol http host 'www.mega.co.nz'.

    match Protocol http host 'www.radios-on-line.com.ar'.

    match Protocol http host 'www.enlaradio.com.ar'.

    Protocol http host «www.cienradios.com.ar» game

    match Protocol http host 'www.radios-argentina.com.ar'.

    match Protocol http host 'www.fmyam.com.ar'.

    Protocol http host «www.piratebay.org» game

    class-map match-all P2P

    winmx Protocol game

    gnutella Protocol game

    bittorrent Protocol game

    match Protocol kazaa2

    !

    !

    Policy-map DROP_PROHIBIDAS

    class PROHIBIDAS

    drop

    class P2P

    drop

    !

    !

    !

    !

    !

    !

    !

    !

    the Embedded-Service-Engine0/0 interface

    no ip address

    Shutdown

    !

    interface GigabitEthernet0/0

    Fibertel description

    DHCP IP address

    IP access-group acl101 in

    IP access-group out acl101

    NAT outside IP

    IP virtual-reassembly in

    automatic duplex

    automatic speed

    No cdp enable

    out of service-policy DROP_PROHIBIDAS

    !

    interface GigabitEthernet0/1

    Arnet description

    IP 186.153.125.138 255.255.255.248

    IP access-group acl101 in

    IP access-group out acl101

    NAT outside IP

    IP virtual-reassembly in

    automatic duplex

    automatic speed

    No cdp enable

    out of service-policy DROP_PROHIBIDAS

    !

    interface GigabitEthernet0/2

    IP 192.168.2.2 255.255.0.0

    IP access-group block_FB in

    IP access-group out acl101

    IP nat inside

    IP virtual-reassembly in

    IP tcp adjust-mss 1452

    automatic duplex

    automatic speed

    No cdp enable

    !

    router RIP

    version 2

    network 192.168.0.0

    !

    IP forward-Protocol ND

    !

    IP http server

    IP 8180 http port

    20 class IP http access

    IP http secure server

    IP http timeout policy slowed down 60 life 86400 request 10000

    !

    IP nat inside source map route address interface GigabitEthernet0/1 overload

    IP nat inside source map route fibertel interface GigabitEthernet0/0 overload

    IP route 0.0.0.0 0.0.0.0 track GigabitEthernet0/0 123

    IP route 0.0.0.0 0.0.0.0 200.122.102.1 254

    !

    block_FB extended IP access list

    deny ip 192.168.0.0 0.0.255.255 welcome 173.252.100.16

    deny ip 192.168.0.0 0.0.255.255 173.252.64.0 0.0.63.255

    deny ip 192.168.0.0 0.0.255.255 31.13.24.0 0.0.7.255

    deny ip 192.168.0.0 0.0.255.255 31.13.64.0 0.0.63.255

    deny ip 192.168.0.0 0.0.255.255 66.220.144.0 0.0.15.255

    deny ip 192.168.0.0 0.0.255.255 69.63.176.0 0.0.15.255

    deny ip 192.168.0.0 0.0.255.255 69.171.224.0 0.0.31.255

    deny ip 192.168.0.0 0.0.255.255 74.119.76.0 0.0.3.255

    deny ip 192.168.0.0 0.0.255.255 103.4.96.0 0.0.3.255

    deny ip 192.168.0.0 0.0.255.255 204.15.20.0 0.0.3.255

    IP 192.168.0.0 allow 0.0.255.255 everything

    allow an ip

    !

    access-list 110 permit ip 192.168.0.0 0.0.255.255 everything

    !

    !

    !

    !

    route allowed fibertel 10 map

    corresponds to the IP 110

    is the interface GigabitEthernet0/0

    !

    arnet allowed 10 route map

    corresponds to the IP 110

    is the interface GigabitEthernet0/1

    !

    !

    !

    control plan

    !

    !

    exec banner ^ C ^ C

    connection of the banner ^ C ^ C

    Banner motd ^ C ^ C

    !

    Line con 0

    local connection

    line to 0

    line 2

    no activation-character

    No exec

    preferred no transport

    transport of entry all

    transport output pad rlogin lapb - your MOP v120 udptn ssh telnet

    StopBits 1

    line vty 0 4

    access-class 23 in

    privilege level 15

    local connection

    transport input telnet ssh

    line vty 5 15

    access-class 23 in

    privilege level 15

    local connection

    transport input telnet ssh

    !

    Scheduler allocate 20000 1000

    end

    So far so good, I have check the transactions of NAT:

    ROUTER1 #show ip nat trans

    Inside global internal local outside global local outdoor Pro

    TCP 200.122.102.74:62114 192.168.0.1:62114 17.151.239.110:443 17.151.239.110:443

    TCP 200.122.102.74:62119 192.168.0.1:62119 17.172.233.134:5223 17.172.233.134:5223

    TCP 200.122.102.74:34945 192.168.0.2:34945 181.30.241.103:443 181.30.241.103:443

    TCP 200.122.102.74:37444 192.168.0.2:37444 173.194.42.230:443 173.194.42.230:443

    TCP 200.122.102.74:37695 192.168.0.2:37695 181.30.241.109:80 181.30.241.109:80

    TCP 200.122.102.74:40662 192.168.0.2:40662 173.194.74.188:5228 173.194.74.188:5228

    TCP 186.153.125.138:41426 192.168.0.2:41426 216.115.101.179:443 216.115.101.179:443

    TCP 200.122.102.74:41484 192.168.0.2:41484 216.115.101.179:443 216.115.101.179:443

    TCP 200.122.102.74:42381 192.168.0.2:42381 181.30.241.31:80 181.30.241.31:80

    TCP 186.153.125.138:42553 192.168.0.2:42553 98.136.223.39:8996 98.136.223.39:8996

    and I see they're going through the two connections.

    Buuuuuuuuuuuuut, when I check the interfaces...

    ROUTER1 #show int g0/0

    GigabitEthernet0/0 is up, line protocol is up

    Material is CN Gigabit Ethernet, the address is c464.1354.b8c0 (BIA c464.1354.b8c0

    )

    Description: Fibertel

    The Internet address is 200.122.102.74/24

    MTU 1500 bytes, BW 100000 Kbit/s, DLY 100 usec,

    reliability 255/255, txload 1/255, rxload 1/255

    Encapsulation ARPA, loopback not set

    KeepAlive set (10 sec)

    Full-Duplex, 100 Mbps, media type is RJ45

    control output stream is XON, control of input stream is XON

    Type of the ARP: ARPA, ARP Timeout 04:00

    Last entry of 00:00:00, 00:00:00 exit, exit hang never

    Final cleaning of "show interface" counters never

    Input queue: 0/75/0/0 (size/max/drops/dumps); Total output drops: 0

    Strategy of queues: fifo

    Output queue: 0/40 (size/max)

    5 minute input rate 774000 bps, 161 packets/s

    5 minute output rate 423000 bps, 102 packets/s

    2133521 package, 1223904205 bytes, 0 no buffer entry

    Received 615778 broadcasts (0 of IP multicasts)

    0 Runts, 0 giants, 0 shifters

    entry 0, 0 CRC errors, frame 0, saturation 0, 0 ignored

    Watchdog 0, multicast 0, break 0 comments

    1065308 packets output, 214203455 bytes, 0 underruns

    0 output errors, 0 collisions, 1 interface resets

    unknown protocol 0 drops

    0 babbles, collision end 0, 0 deferred

    1 lost carrier, 0 no carrier, interrupt the output of 0

    output buffer, the output buffers 0 permuted 0 failures

    ROUTER1 #show int g0/1

    GigabitEthernet0/1 is up, line protocol is up

    Material is CN Gigabit Ethernet, the address is c464.1354.b8c1 (BIA c464.1354.b8c1

    )

    Description: arnet

    The Internet address is 186.153.125.138/29

    MTU 1500 bytes, BW 100000 Kbit/s, DLY 100 usec,

    reliability 255/255, txload 1/255, rxload 1/255

    Encapsulation ARPA, loopback not set

    KeepAlive set (10 sec)

    Full-Duplex, 100 Mbps, media type is RJ45

    control output stream is XON, control of input stream is XON

    Type of the ARP: ARPA, ARP Timeout 04:00

    Last entry 00:04:01, 00:00:06 exit, exit hang never

    Final cleaning of "show interface" counters never

    Input queue: 0/75/0/0 (size/max/drops/dumps); Total output drops: 0

    Strategy of queues: fifo

    Output queue: 0/40 (size/max)

    5 minute input rate 0 bps, 0 packets/s

    5 minute output rate 0 bps, 0 packets/s

    208948 packages, 153515983 bytes, 0 no buffer entry

    Received 1236 broadcasts (0 of IP multicasts)

    0 Runts, 0 giants, 0 shifters

    entry 0, 0 CRC errors, frame 0, saturation 0, 0 ignored

    Watchdog 0, multicast 0, break 0 comments

    190283 packets output, 45657373 bytes, 0 underruns

    0 output errors, 0 collisions, 0 resets interface

    unknown protocol 0 drops

    0 babbles, collision end 0, 0 deferred

    carrier, 0 no carrier, lost 0 0 interrupt output

    output buffer, the output buffers 0 permuted 0 failures

    Everything happens through G0/0 and nothing in G0/1!

    Any ideas on why this is happening?

    Thank you in advance for your help!

    Kind regards

    Alan

    Hello

    Yes here you only have a single default route installed (one from the DHCP server) so it can't NAT on the other interface as it can route on this one.

    Change your configuration like this:

    no ip route 0.0.0.0 0.0.0.0 track GigabitEthernet0/0 123

    no ip route 0.0.0.0 0.0.0.0 200.122.102.1 254

    IP route 0.0.0.0 0.0.0.0 dhcp

    IP route 0.0.0.0 0.0.0.0 200.122.102.1 254

    Now if you want to follow the first route look at this document:

    http://www.Cisco.com/en/us/docs/iOS/dial/configuration/guide/dia_rel_stc_rtg_bckup.html#wp1065528

    Concerning

    Alain

    Remember messages useful rate.

  • Total number of concurrent VPN connections.

    Hey guys,.

    Is it possible to display or not even connect to the total number of simultaneous in one month vpn connection?

    THX

    On the SAA, you can enter the command "Show vpn-sessiondb", it shows the info.

    Demo - asa vpn-sessiondb # HS

    Summary of the current Session

    Sessions:

    Active principles: Cumulative: simultaneous peak: inactive

    SSL VPN               :       0 :        145 :               7

    Clientless only: 0: 30: 2

    Client: 0: 0: 3: 115

    E-mail Proxy: 0: 0: 0

    IPsec LAN-to-LAN: 0: 0: 0

    IPsec remote access: 0: 0: 0

    VPN load balancing: 0: 0: 0

    Totals: 0: 145

    Information about the license:

    IPsec: 750 configured: 750 Active: 0 load: 0%

    SSL VPN: 50 configured: 50 Active: 0 load: 0%

    Active principles: Cumulative: simultaneous peak

    IPsec               :          0 :          0 :               0

    SSL VPN             :          0 :        145 :               7

    AnyConnect Mobile: 61: 61: 61

    Linksys Phone: 0: 0: 0

    Totals: 0: 145

    I'm sure that there are much better alternatives such as Cisco ACS including the quality of the production.

    But I have recently installed Microsoft IAS on my Windows 2003 server and then configured accounting for my VPN group policy. I then used a free 'IAS log viewer"software which is able to provide the use of my VPN.

    See the article below for configuring Microsoft IAS on Win2k3:

    http://www.Cisco.com/en/us/products/HW/vpndevc/ps2284/products_configuration_example09186a0080094700.shtml

    The whole process took me less than an hour. Nice report generated by the IAS log viewer.

    Thank you

    Kiran

Maybe you are looking for

  • Why do I get a small triangle on the fields to resize them

    In firefox, I get a small triangle at the bottom / right of each field to resize the field - how to rig of this

  • HP Pavilion: Nothing but problems in the months since I changed to win 10

    I have about a four year old computer that was drawing up along very well under Win 7. Since evolution to win 10, nothing went right. Spoil, to correct and then ruin once again.  For example, for most of the time since the change, my #2 monitor has g

  • Upgrade to GTX760 Gigabyte on Envy 810-160

    I would like to install the following: graphics OC Gigabyte GTX760 GDDR5 - 4 GB 2xDVI/HDMI/DP card on the following system - Phoenix ENVY 810-160 HP Product # F3D90AA #ABA Card mother MS-7826 (Kaili) I7 processor 4770 3.9 Ghz Turbo Is this possible?

  • Cannot connect iphone with itunes

    Hello I just bought a new Iphone s 6 pluss, but I can't connect with itunes on my Mac, whenever I plug the usb into my Mac, a window appears and tells me that itunes can't find my iphone because he wants a future verson of itunes. But I have the late

  • iCloud inaccessible documents from Mac

    I am running OS X.11.2 on a Mac mini (end of 2014) with 2.6 GHz Intel Core processor i5 and 8 GB 1600 MHz Ram and integrated graphics Intel Iris. I recently discovered that Pages 5.6.1 and Numbers 3.6.1 cannot open documents that are stored in iCloud