Statement syntax 1-1 nat NAT

Hello

I am looking for the correct syntax add a NAT rule 1 to 1 on my Firewall VPN policy to connect test ping to a server IP address in the data center network remotely.

My local ip address is 192.168.255.1 loopback1

The remote server ip is 192.168.1.100

What IP is added to the VPN policy?

Steve,

For version 8.2 (3), a NAT static (1-1) would be as follows.

public static 209.165.xxx.xxx (Interior, exterior) 192.168.1.100 netmask 255.255.255.255

Tags: Cisco Security

Similar Questions

  • Gears update statement syntax

    I obviously have something messed up with the syntax of the following statement but I can't figure it out... anyone know what im doing wrong?

    _db.execute('UPDATE sbItems SET sbs1 = ? WHERE thedate = ?', [td,db]);
    
            sql = 'select * from sbItems where thedate = ?';
        rs = _db.execute(sql,[thedate]);
        if (rs.isValidRow()) {
            sql = 'UPDATE sbItems SET sbs1 = ? WHERE thedate = ?';
            _db.execute(sql, [sbs1,thedate]);
    
        } else {
            alert("Row not Found");
    
        }
    

    Turns out I had a problem with my formatting to survive that was causing the problem, the above code work if someone else happens to search for this...  FYI "subsist" is in fact a string and not a date in my table...

  • Help! It drives me crazy. Report CASE (missing operator) statement syntax error

    Hello

    Can anyone help with this SQL statement please. It uses a CASE statement but again I get a syntax error (missing operator) error message. The SQL statement runs without the CASE statement, so everything else is fine - it's just when I put the CASE back statement in.

    Here is the SQL statement:-

    SELECT transactions.ourRef, transactions.transDate, CASE WHEN transactions.transTypeID = 2 THEN transactionDetails.goodsVatable *-1 ELSE transactionDetails.goodsVatable END, transactionDetails.goodsNonVat, transactionDetails.VAT, transactionDetails.grandTotal, clients.clientCode, transTypes.transTypeDesc
    Operations, customers, transactionDetails, transTypes
    WHERE transactions.transID = transactionDetails.transID
    AND transactions.clientID = clients.clientID
    AND transactions.transTypeID = transTypes.transTypeID

    TransID = 2 means that it is a credit not instead of a Bill, that's why I want the goods vatable returned as a negative number.

    Thanks in advance.

    Wez

    Quote:
    .. .the customer wish for me to use a MS Access db

    Too bad that you said that in a first time. I think you can consider using IIF() with access.

    Syntax: IIf (expr, truepart, falsepart)

    SELECT transactions.ourRef,
    transactions.transDate,
    IIf (transactions.transTypeID = 2, transactionDetails.goodsVatable *-1, transactionDetails.goodsVatable).
    transactionDetails.goodsNonVat,
    transactionDetails.VAT,
    transactionDetails.grandTotal,
    clients.clientCode,
    transTypes.transTypeDesc
    Operations, customers, transactionDetails, transTypes
    WHERE transactions.transID = transactionDetails.transID
    AND transactions.clientID = clients.clientID
    AND transactions.transTypeID = transTypes.transTypeID

    Phil

  • DRM: Reported statement syntax

    Team,

    Please bear with me while I try to explain to my business needs.

    Currently I have a CostCenter in DRM which is irregular hierarchy consisting of 10 levels. There is a need of business to create a symmetrical export of Parent/child to generate reports that only consists of 3 levels.

    That's why I want to do the following:

    Create a derived custom.prop1 called "Reporting_Flag".

    And another

    I would then go out through the tag of the Parent hierarchy and a child (with a ' 1' for Reporting_Flag) in the SAME line with the hierarchy.

    For example, a Parent could be level 2 and a child level 7, so I need to shoot those export in a format of parent/child through the hierarchy.  How can I do this? Is this possible?


    Please let me know if you need more details, thank you!

    If (Equals (Integer, varValeurProp (Core.Level), 1), zero,

    ArrayItem (FlipList (ListRelatedNodesWith (Ancestors, Equals (String, PropValue (Custom.Reporting_Flag), 1) yesterday, 0), [Comma]), [Comma], 1)

    )

    If any will be the parent to the TopNode

    Thnaks

    Denzz

  • On if/else statement syntax error

    In the form of PDF from Adobe, trying to implement a javascript script on the exit event of mouse of a column in table 2, line 1, than if they enter a quantity, it will add a number to item number column to the left.  Each row/quantity would have a similar code, but I get a "SyntaxError: missing; before instruction 2: line 3 "error.  Point No.0 is the name of the 1st column (respectively by rank, point n ° 1, 2, etc.).  What I am doing wrong?  Thank you!

    Here is my code:

    if ($.isNull)
      {Item No.0 =  "";}
    else
      {Item No.0 = "1";}
    

    Sorry for typo's fault, it should be:

    getField("ItemNo.0").value = event.value? 1 : "";

  • A Site with NAT

    Hi all, thanks for looking. I'm a very basic user to a Cisco ASA 5510, I tend to do most of the things in the ASDM GUI interface.

    We need to create a site to site with a client connection. It's pretty easy but there is a caveat, we can use our internal IPS that they already use the range elsewhere. If we gave them two different IP, for example 192.158.22.101 and 192.158.22.102. I created the site to the site using these two survey periods, but these do not exist internally on the machines because they are not IPs on our network, which is using 192.158.44.0.

    The question I have is how can I get the IP addresses 192.158.44.101 and 192.158.44.102 to become 92.158.22.101 and 92.158.22.102 before being sent via this connection. I tried to add the NAT to the object of an IP address related, but I'm obviously missing something.

    The other option, I do not fear to do, is to add a new range of internal IP 192.158.22.0 addresses, but I don't know how do either.

    Any help would be appreciated, I'm really bad here and spent two weeks on this subject already. I searched for it, but it seems that it is either too basic for most people wonder or slightly different, for example, they have control of the two sites.

    Hello

    Add to that dieng said here is the config for NATTING as two IPS 192.158.44.101 and 102:

    network object obj - 192.158.44.101

    Home 192.158.44.101

    network object obj - 192.158.44.102

    Home 192.158.44.102

    object obj -192.158.22.101 network

    Home 192.158.22.101

    object obj -192.158.22.102 network

    host 192.158.22.102

    object obj remote network

    10.x.x.x subnet 255.255.255.0

    You need two NAT statements for this:

    NAT (inside, outside) source dynamic obj - 192.158.44.101 obj -192.158.22.101 destination static obj-remote obj-remote

    nat source (indoor, outdoor) obj dynamic obj - 192.158.44.102 - 192.158.22.102 destination static obj obj-remote control-remote control

    It will be useful.

    Kind regards

    Aditya

    Please evaluate the useful messages.

  • Configuration VPN - NAT - T support

    Hello

    A partner of business (BP) has the following requirements. I don't know which statements of config I need to use to ensure this successful connection

    Business (BP) needs partner complete the VPN tunnel on a firewall that is behind another firewall running NAT

    (BP) will create UDP 500 and UDP 4500 endpoints on the NAT firewall which is forwarded to the Firewall VPN termination.

    Because of this, the (BP) needs of my dissertation support encapsulation of ESP over UDP (NAT - T)

    My series of ASA5500 using the code (825) has the statements

    Crypto isakmp nat-traversal 21
    crypto ISAKMP ipsec-over-tcp port 10000

    VPN # match address BP_VPN crypto card
    VPN # set peer (peer_ip) crypto card
    VPN # game of transformation-AES_256_SHA crypto card

    IPSec-l2l type tunnel-group (peer_ip)
    IPSec-attributes of tunnel-group (peer_ip)
    pre-shared key (TBD)

    BP_VPN list extended access permit tcp host 10.x.x.x, 172.16.x.x eq (specified port) host
    BP_VPN list extended access permit tcp host 10.x.x.y host 172.16.x.x eq (specified port)

    NatExempt_VPN list extended access permit tcp host 10.x.x.x, 172.16.x.x eq (specified port) host
    NatExempt_VPN list extended access permit tcp host 10.x.x.y host 172.16.x.x eq (specified port)

    Please indicate whether these statements are sufficient and if not what else would be needed.

    You need not order

    crypto isakmp ipsec-over-tcp port 10000
    It is for the exclusive implementation that was used before NAT - T is available. You only need to nat-traversal active. For your ACL, using ports in there makes everything complicated. You should see if you can just use 'ip' here. If there is already configured on your ASA virtual private networks, then the config is probably ok. If this isn't the case, you must always configure ISAKMP and activate the encryption on the interface card.
  • Static nat and NAT ACL 0

    All,

    I have nat 0 ACL indicating that an ip address should not be natted, while a static nat statement saying we need natted. I just want to know that we will have precedence.

    Thank you

    It is of the order of operations PIX nat / ASA.

    the NAT 0 acl_name (nameif) has priority.

    1 nat 0-list of access (free from nat)

    2. match the existing xlates

    3. match the static controls

    a. static NAT with no access list

    b. static PAT with no access list

    4. match orders nat

    a. nat [id] access-list (first match)

    b. nat [id] [address] [mask] (best match)

    i. If the ID is 0, create an xlate identity

    II. use global pool for dynamic NAT

    III. use global dynamic pool for PAT

  • the NAT ID processing order

    Hello all;

    No one knows and also anyone can provide some bad infoamtion processs NAT ID flow?

    I have two nat/global declarations.

    access allowed WWW ip object-group COMPANY-A list any

    Global (outside) 30 60.100.100.60 255.255.255.192 subnet mask

    Global (DMZ) 3 interface

    Global (DMZ2) interface 50

    NAT (inside) 0 access-list SHEEP

    NAT (inside) 30-list of WWW access 0 0

    NAT (inside) 50 access-list DMZ2 0 0

    take my word for it. WWW and DMZ2 access list the two match the egressing package.

    I need to know if the nat WWW give a 90 nat id, it would solve my problem? My problem is the package for dmz2 is out the external interface.

    concerning

    Jeff

    6.3 order Ref. (http://www.cisco.com/univercd/cc/td/doc/product/iaabu/pix/pix_sw/v_63/cmdref/mr.htm#wp1032129):

    Order NAT used to match local addresses

    The firewall is local traffic to the NAT commands in the following order:

    1 nat 0-list of access (NAT exemption)? In order, until the first game. For example, you may have places of destination / limited overlapping in several orders of nat, but only the first order is put into correspondence.

    2. static (static NAT)? In order, until the first game. Because you can not use the same local address in the static NAT or static PAT orders, the order of the static controls does not matter. Similarly, for the static policy NAT, does not allow the same destination/local address and port through several instructions.

    3. static {tcp | udp} (static PAT)? In order, until the first game. Because you can not use the same local address in the static NAT or static PAT orders, the order of the static controls does not matter. Similarly, for the static policy NAT, does not allow the same destination/local address and port through several instructions.

    4. nat_id access-list (policy NAT) nat? In order, until the first game. For example, you may have addresses and ports of destination/local which overlap in several orders of nat, but only the first command is matched.

    5 (regular NAT) nat? Best match. The NAT order does not matter. The nat statement that best matches the local traffic is used. For example, you can create a general instruction to translate addresses (0.0.0.0) on an interface. If you also create a statement to translate only 10.1.1.1, when 10.1.1.1 establishes a connection, specific instruction for 10.1.1.1 is used because it suited to local traffic.

    If you configure multiple global statements on the same NAT ID, the global declarations are used in this order:

    1. overall if you use 0 (identity NAT) nat.

    2 dynamic global NAT.

    3 PAT global.

  • Cisco Asa vpn site-to-site with nat

    Hi all

    I need help
    I want to make a site from the site with nat vpn
    Site A = 10.0.0.0/24
    Site B = 10.1.252.0/24

    I want when site A to site B, either by ip 172.26.0.0/24

    Here is my configuration

    inside_nat_outbound to access ip 10.0.0.0 scope list allow 255.255.255.0 10.1.252.0 255.255.255.0

    tunnel-group x.x.x.x type ipsec-l2l
    tunnel-group ipsec-attributes x.x.x.x
    pre-shared-key!

    ISAKMP retry threshold 10 keepalive 2

    Crypto ipsec transform-set ESP-AES-256-SHA 256 - aes - esp esp-sha-hmac
    card crypto outside_map 2 match address inside_nat_outbound

    card crypto outside_map 2 pfs set group5
    card crypto outside_map 2 peers set x.x.x.x

    card crypto outside_map 2 game of transformation-ESP-AES-256-SHA

    NAT (inside) 10 inside_nat_outbound

    Global 172.26.0.1 - 172.26.0.254 10 (outside)

    but do not work.

    Can you help me?

    Concerning

    Frédéric

    You must ensure that there is no NAT 0 ACL statement because it will take precedence over the static NAT.

    You don't need:

    Global 172.26.0.1 - 172.26.0.254 10 (outside)

    NAT (inside) 10 access-list nattoyr

    Because it will be replaced by the static NAT.

    In a Word is enough:

    nattoyr to access ip 10.0.0.0 scope list allow 255.255.255.0 10.1.252.0 255.255.255.0

    access extensive list ip 172.26.0.0 vpntoyr allow 255.255.255.0 10.1.252.0 255.255.255.0

    public static 172.26.0.0 (inside, outside) - nattoyr access list

    card crypto outside_map 2 match address vpntoyr

    card crypto outside_map 2 pfs set group5

    card crypto outside_map 2 defined peer "public ip".

    card crypto outside_map 2 game of transformation-ESP-AES-256-SHA

    outside_map interface card crypto outside

    tunnel-group "public ip" type ipsec-l2l

    tunnel-group "public ip" ipsec-attributes

    pre-shared key *.

    -Make sure that it not there no NAT ACL 0 including the above statements and check if NAT happening (sh xlate) and the

    traffic is being encryption (sh cry ips its)

    Federico.

  • Disable the NAT for VPN site-to-site

    Hello world

    I work in a company, and we had to make a VPN site-to site.

    Everything works fine, except that the packages sent to my site are translated, in other words: the firewall on the other site (site_B) see only the IP address of my firewall (Site_A).

    I tried to solve the problem, but without success, I think that natives of VPN packets is the problem.

    Here is my current config running:

    ASA Version 8.3(2)

    !

    hostname ciscoasa

    enable password 9U./y4ITpJEJ8f.V encrypted

    passwd 2KFQnbNIdI.2KYOU encrypted

    names

    !

    interface Vlan1

    nameif inside

    security-level 100

    ip address 192.168.67.254 255.255.255.0

    !

    interface Vlan2

    nameif outside

    security-level 0

    ip address 41.220.X.Y 255.255.255.252 (External WAN public IP Address)

    !

    interface Ethernet0/0

    switchport access vlan 2

    !

    interface Ethernet0/1

    !

    interface Ethernet0/2

    !

    interface Ethernet0/3

    !

    interface Ethernet0/4

    !

    interface Ethernet0/5

    !

    interface Ethernet0/6

    !

    interface Ethernet0/7

    !

    ftp mode passive

    clock timezone CET 1

    object network obj_any

    subnet 0.0.0.0 0.0.0.0

    object network 41.220.X1.Y1

    host 41.220.X1.Y1

    object network NETWORK_OBJ_192.168.67.0_24

    subnet 192.168.67.0 255.255.255.0

    object network NETWORK_OBJ_172.19.32.0_19

    subnet 172.19.32.0 255.255.224.0

    object network 194.2.176.18

    host 194.2.XX.YY (External IP address public of the other site (Site_B))

    description 194.2.XX.YY

    access-list inside_access_in extended permit ip any any log warnings

    access-list inside_access_in extended permit ip object NETWORK_OBJ_172.19.32.0_19 object NETWORK_OBJ_192.168.67.0_24 log debugging

    access-list inside_access_in extended permit ip object 194.2.176.18 any log debugging

    access-list inside_access_in extended permit ip any object NETWORK_OBJ_172.19.32.0_19 log debugging

    access-list outside_1_cryptomap extended permit ip 192.168.67.0 255.255.255.0 172.19.32.0 255.255.224.0 log debugging

    access-list outside_1_cryptomap extended permit ip any object NETWORK_OBJ_172.19.32.0_19 log debugging

    access-list 1111 standard permit 172.19.32.0 255.255.224.0

    access-list 1111 standard permit 192.168.67.0 255.255.255.0

    access-list outside_1_cryptomap_1 extended permit ip 172.19.32.0 255.255.224.0 any log debugging

    access-list outside_1_cryptomap_1 extended permit ip any object NETWORK_OBJ_172.19.32.0_19 log debugging

    access-list outside_1_cryptomap_2 extended permit ip 192.168.67.0 255.255.255.0 172.19.32.0 255.255.224.0 log debugging

    access-list outside_1_cryptomap_2 extended permit ip any object NETWORK_OBJ_172.19.32.0_19 log debugging

    access-list outside_access_in extended permit ip any any log warnings

    access-list outside_access_in extended permit ip object 194.2.XX.YY any log debugging

    access-list outside_access_in extended permit ip any object NETWORK_OBJ_172.19.32.0_19 log debugging

    access-list nonat extended permit ip 192.168.67.0 255.255.255.0 176.19.32.0 255.255.224.0

    access-list nonat extended permit ip 192.168.67.0 255.255.255.0 172.19.32.0 255.255.224.0

    pager lines 24

    logging enable

    logging monitor informational

    logging asdm warnings

    mtu inside 1500

    mtu outside 1500

    icmp unreachable rate-limit 1 burst-size 1

    icmp permit any inside

    icmp permit any outside

    no asdm history enable

    arp timeout 14400

    nat (inside,outside) source dynamic any interface

    nat (inside,outside) source static NETWORK_OBJ_192.168.67.0_24 NETWORK_OBJ_192.168.67.0_24 destination static NETWORK_OBJ_172.19.32.0_19 NETWORK_OBJ_172.19.32.0_19

    access-group inside_access_in in interface inside

    access-group outside_access_in in interface outside

    route outside 0.0.0.0 0.0.0.0 41.220.X.Y 1

    timeout xlate 3:00:00

    timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02

    timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00

    timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00

    timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute

    timeout tcp-proxy-reassembly 0:01:00

    dynamic-access-policy-record DfltAccessPolicy

    aaa authentication ssh console LOCAL

    aaa authentication telnet console LOCAL

    http server enable

    http 192.168.67.0 255.255.255.0 inside

    http 0.0.0.0 0.0.0.0 outside

    no snmp-server location

    no snmp-server contact

    snmp-server enable traps snmp authentication linkup linkdown coldstart

    crypto ipsec transform-set ESP-DES-MD5 esp-des esp-md5-hmac

    crypto ipsec transform-set ESP-DES-SHA esp-des esp-sha-hmac

    crypto ipsec security-association lifetime seconds 28800

    crypto ipsec security-association lifetime kilobytes 4608000

    crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set transform-set ESP-DES-MD5

    crypto map outside_map 1 match address outside_1_cryptomap_2

    crypto map outside_map 1 set peer 194.2.XX.YY

    crypto map outside_map 1 set transform-set ESP-DES-MD5

    crypto map outside_map 65535 ipsec-isakmp dynamic SYSTEM_DEFAULT_CRYPTO_MAP

    crypto map outside_map interface outside

    crypto map inside_map 65535 ipsec-isakmp dynamic SYSTEM_DEFAULT_CRYPTO_MAP

    crypto map inside_map interface inside

    crypto isakmp enable inside

    crypto isakmp enable outside

    crypto isakmp policy 10

    authentication pre-share

    encryption des

    hash md5

    group 2

    lifetime 86400

    telnet 192.168.67.200 255.255.255.255 inside

    telnet timeout 5

    ssh 0.0.0.0 0.0.0.0 outside

    ssh timeout 30

    console timeout 0

    dhcpd auto_config outside

    !

    threat-detection basic-threat

    threat-detection statistics access-list

    no threat-detection statistics tcp-intercept

    webvpn

    username bel_md password HSiYQZRzgeT8u.ml encrypted privilege 15

    username nebia_said password qQ6OoFJ5IJa6sgLi encrypted privilege 15

    tunnel-group 194.2.XX.YY type ipsec-l2l

    tunnel-group 194.2.XX.YY ipsec-attributes

    pre-shared-key *****

    !

    class-map inspection_default

    match default-inspection-traffic

    !

    !

    policy-map type inspect dns preset_dns_map

    parameters

    message-length maximum client auto

    message-length maximum 512

    policy-map global_policy

    class inspection_default

    inspect dns preset_dns_map

    inspect ftp

    inspect h323 h225

    inspect h323 ras

    inspect rsh

    inspect rtsp

    inspect esmtp

    inspect sqlnet

    inspect skinny

    inspect sunrpc

    inspect xdmcp

    inspect sip

    inspect netbios

    inspect tftp

    inspect ip-options

    inspect icmp

    inspect ipsec-pass-thru

    !

    service-policy global_policy global

    prompt hostname context

    Cryptochecksum:0398876429c949a766f7de4fb3e2037e

    : end

    If you need any other information or explanation, just ask me.

    My firewall model: ASA 5505

    Thank you for the help.

    Hey Houari,.

    I suspect something with the order of your NATing statement which is:

    NAT (inside, outside) static static source NETWORK_OBJ_172.19.32.0_19 destination NETWORK_OBJ_192.168.67.0_24 NETWORK_OBJ_192.168.67.0_24 NETWORK_OBJ_172.19.32.0_19

    Can you please have this change applied to the ASA:

    No source (indoor, outdoor) nat static static NETWORK_OBJ_172.19.32.0_19 destination NETWORK_OBJ_192.168.67.0_24 NETWORK_OBJ_192.168.67.0_24 NETWORK_OBJ_172.19.32.0_19

    NAT (inside, outside) 1 static source NETWORK_OBJ_192.168.67.0_24 NETWORK_OBJ_192.168.67.0_24 static destination NETWORK_OBJ_172.19.32.0_19 NETWORK_OBJ_172.19.32.0_19

    Try and let me know how it goes.

    If she did not help, please put the output form a package tracer will shape your internal network to the remote VPN subnet with the release of «see the nat detail»

    HTH,

    Mo.

  • Help - nested Case statement

    Hello everyone.  I'm having a hell of a time trying to understand my nested case statement.  It's pretty simple, but I always feel to get this error:

    ORA-00937: not a single group group function
    * 00937. 00000 - 'not a single-group function. "
    Cause:
    Action:

    However, when I try to enter in a "group by" I get this error:

    ORA-00979: not a GROUP BY expression
    * 00979. 00000 - 'not a GROUP BY expression. "
    Cause:
    Action:

    I don't know if there is something wrong with my nested case statement syntax, or miss me something more fundamental. This is my code:
    SELECT AE.EMP_ID,
      CASE
        WHEN EP.PHYSICAL_DATE IS NULL
        THEN
          CASE
            WHEN EC.ORIGINAL_CONTRACT_START < ((SYSDATE) - 365)
            THEN 'NEEDS PHYSICAL'
            WHEN EC.ORIGINAL_CONTRACT_START < ((SYSDATE) - 330)
            THEN 'COMING UP'
            ELSE 'No'
          END
        WHEN MAX(EP.PHYSICAL_DATE) KEEP (DENSE_RANK LAST
        ORDER BY EP.PHYSICAL_DATE) < ((SYSDATE) - 365)
        THEN 'NEEDS PHYSICAL'
        WHEN MAX(EP.PHYSICAL_DATE) KEEP (DENSE_RANK LAST
        ORDER BY EP.PHYSICAL_DATE) < ((SYSDATE) - 330)
        THEN 'COMING UP'
        ELSE 'No'
      END "Needs Physical?"
    FROM AP AE
    LEFT JOIN EMP_PHYSICAL EP
    ON AE.EMP_ID = EP.EMP_ID
    LEFT JOIN POSITION_OFFERED PO
    ON AE.EMP_ID = PO.EMP_ID
    LEFT JOIN EMP_CONTRACT EC
    ON AE.EMP_ID         = EC.EMP_ID
    WHERE PO.ACTUAL_END IS NULL
    AND (EP.PHYSICAL     = 1
    OR EP.PHYSICAL      IS NULL)
    AND :P71_EMP_ID = AE.EMP_ID;
    I appreciate all help. Nice day.

    Aqua

    SELECT AE.EMP_ID,
    CASE
    WHEN EP.PHYSICAL_DATE IS NULL
    THEN
    CASE
    WHEN EC.ORIGINAL_CONTRACT_START < ((SYSDATE) - 365)
    THEN 'NEEDS PHYSICAL'
    WHEN EC.ORIGINAL_CONTRACT_START < ((SYSDATE) - 330)
    THEN 'COMING UP'
    ELSE 'No'
    END
    WHEN MAX(EP.PHYSICAL_DATE) KEEP (DENSE_RANK LAST
    ORDER BY EP.PHYSICAL_DATE) < ((SYSDATE) - 365)
    THEN 'NEEDS PHYSICAL'
    WHEN MAX(EP.PHYSICAL_DATE) KEEP (DENSE_RANK LAST
    ORDER BY EP.PHYSICAL_DATE) < ((SYSDATE) - 330)
    THEN 'COMING UP'
    ELSE 'No'
    END "Needs Physical?"
    FROM AP AE
    LEFT JOIN EMP_PHYSICAL EP
    ON AE.EMP_ID = EP.EMP_ID
    LEFT JOIN POSITION_OFFERED PO
    ON AE.EMP_ID = PO.EMP_ID
    LEFT JOIN EMP_CONTRACT EC
    ON AE.EMP_ID = EC.EMP_ID
    WHERE PO.ACTUAL_END IS NULL
    AND (EP.PHYSICAL = 1
    OR EP.PHYSICAL IS NULL)
    AND :P71_EMP_ID = AE.EMP_ID;
    GROUP BY AE.EMP_ID,EP.PHYSICAL_DATE,EC.ORIGINAL_CONTRACT_START;

    
    

    Hi,

    You need to add Group by clause at the end of the query i have added above.

  • Can one Select statement in the When Clause

    Hello

    Can write us request something like this

    declare
    ACCOUNT NUMBER;
    BEGIN
    SELECT
    CASE
    WHEN
    (SELECT COUNT (STATUS) IN EXECUTION_LOG
    WHERE package_name = "India Student Load"
    AND THE STATUS IS NULL
    AND TO_DATE (START_DATE, 'MON-DD-YYYY') = TO_DATE (SYSDATE, ' DD-MON-YYYY "")) = 0 THEN COUNT: = 1;

    WHEN
    (SELECT COUNT (STATUS) IN EXECUTION_LOG
    WHERE package_name = "India Student Load"
    AND STATUS = S"
    AND TO_DATE (START_DATE, 'MON-DD-YYYY') = TO_DATE (SYSDATE, ' DD-MON-YYYY "")) = 1 COUNT THEN: = 0;

    WHEN
    (SELECT COUNT (STATUS) IN EXECUTION_LOG
    WHERE package_name = "India Student Load"
    AND THE STATUS TO 'I', 'E '.
    AND TO_DATE (START_DATE, 'MON-DD-YYYY') = TO_DATE (SYSDATE, ' DD-MON-YYYY "")) = 1 COUNT THEN: = 1;
    ANOTHER NULL
    END;
    END;

    944772 wrote:
    Hello

    Can write us request something like this

    declare
    ACCOUNT NUMBER;
    BEGIN
    SELECT
    CASE
    WHEN
    (SELECT COUNT (STATUS) IN EXECUTION_LOG
    WHERE package_name = "India Student Load"
    AND THE STATUS IS NULL
    AND TO_DATE (START_DATE, 'MON-DD-YYYY') = TO_DATE (SYSDATE, ' DD-MON-YYYY "")) = 0 THEN COUNT: = 1;

    WHEN
    (SELECT COUNT (STATUS) IN EXECUTION_LOG
    WHERE package_name = "India Student Load"
    AND STATUS = S"
    AND TO_DATE (START_DATE, 'MON-DD-YYYY') = TO_DATE (SYSDATE, ' DD-MON-YYYY "")) = 1 COUNT THEN: = 0;

    WHEN
    (SELECT COUNT (STATUS) IN EXECUTION_LOG
    WHERE package_name = "India Student Load"
    AND THE STATUS TO 'I', 'E '.
    AND TO_DATE (START_DATE, 'MON-DD-YYYY') = TO_DATE (SYSDATE, ' DD-MON-YYYY "")) = 1 COUNT THEN: = 1;
    ANOTHER NULL
    END;
    END;

    The problem with your request, it's that you mix a SQL CASE statement syntax and a case statement in PL/SQL. SQL cannot make assignments of PL/SQL variables like this.

    In regards to your code, it would be more like...

    declare
      V_COUNT NUMBER;
    BEGIN
      SELECT CASE
               WHEN (SELECT COUNT(STATUS)
                     FROM   EXECUTION_LOG
                     WHERE  PACKAGE_NAME = 'India Student Load'
                     AND    STATUS IS NULL
                     AND    TO_DATE(START_DATE, 'DD-MON-YYYY') = TO_DATE(SYSDATE, 'DD-MON-YYYY')) = 0 THEN 1
               WHEN (SELECT COUNT(STATUS)
                     FROM   EXECUTION_LOG
                     WHERE  PACKAGE_NAME = 'India Student Load'
                     AND    STATUS = 'S'
                     AND    TO_DATE(START_DATE, 'DD-MON-YYYY') = TO_DATE(SYSDATE, 'DD-MON-YYYY')) = 1 THEN 0
               WHEN (SELECT COUNT(STATUS)
                     FROM   EXECUTION_LOG
                     WHERE  PACKAGE_NAME = 'India Student Load'
                     AND    STATUS IN ('I','E')
                     AND    TO_DATE(START_DATE, 'DD-MON-YYYY') = TO_DATE(SYSDATE, 'DD-MON-YYYY')) = 1 THEN 1
             ELSE
               NULL
             END;
      INTO V_COUNT
      FROM DUAL;
    END;
    

    Of course, who could probably be optimized as well.

    ETA: You should not use reserved words for your variable names, 'COUNT' should be something like "V_COUNT.

    Published by: BluShadow on November 30, 2012 09:25
    Forum reading high

  • Using PARTITION FOR / SUBPARTITION FOR the syntax to insert

    We try to use PARTITION syntax for (or, better, SUBPARTITION of syntax) to insert into a table subpartitioned.
    http://docs.Oracle.com/CD/E11882_01/server.112/e26088/sql_elements009.htm#i165979
    08:26:46 GM_CS_CDR@oradev02> select * from v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for Solaris: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    
    5 rows selected.
    This table is interval partitions DATA_ORIGIN_ID and list subpartitions on TABLE_NAME.

    First of all, an insert in base without specifying the partitions:
    08:10:05 GM_CS_CDR@oradev02> insert into key_ids2 (
    08:11:51   2  DATA_ORIGIN_ID         ,
    08:11:51   3  TABLE_NAME             ,
    08:11:51   4  DUR_UK                 ,
    08:11:51   5  DUR_UK_ID              )
    08:11:51   6  select
    08:11:51   7  12         ,
    08:11:51   8  TABLE_NAME             ,
    08:11:51   9  DUR_UK                 ,
    08:11:51  10  DUR_UK_ID              
    08:11:51  11  from key_ids where table_name = 'PART' 
    08:11:51  12  and rownum <= 10;
    
    10 rows created.
    Check SUBPARTITION to a SELECT statement syntax:
    08:19:43 GM_CS_CDR@oradev02> 
    08:26:45 GM_CS_CDR@oradev02> 
    08:26:45 GM_CS_CDR@oradev02> 
    08:26:45 GM_CS_CDR@oradev02> 
    08:26:45 GM_CS_CDR@oradev02> select count(*) from key_ids2 
    08:26:45   2  subpartition for(12,'PART');
    
      COUNT(*)
    ----------
            10
    
    1 row selected.
    But if we add a subpartition specification (to limit the locking to a single subpartition), we get a syntax error:
    08:14:57 GM_CS_CDR@oradev02> insert into key_ids2 subpartition for(12,'PART') (
    08:14:57   2  DATA_ORIGIN_ID         ,
    08:14:57   3  TABLE_NAME             ,
    08:14:57   4  DUR_UK                 ,
    08:14:57   5  DUR_UK_ID              )
    08:14:57   6  select
    08:14:57   7  14         ,
    08:14:57   8  TABLE_NAME             ,
    08:14:57   9  DUR_UK||'!'                 ,
    08:14:57  10  DUR_UK_ID              
    08:14:57  11  from key_ids 
    08:14:57  12  where table_name = 'PART' 
    08:14:57  13  and rownum <= 10;
    insert into key_ids2 subpartition for(12,'PART') (
                                         *
    ERROR at line 1:
    ORA-14173: illegal subpartition-extended table name syntax
    Specify the partition level did not work either:
    08:14:58 GM_CS_CDR@oradev02> insert into key_ids2 partition for(14) (
    08:15:23   2  DATA_ORIGIN_ID         ,
    08:15:23   3  TABLE_NAME             ,
    08:15:23   4  DUR_UK                 ,
    08:15:23   5  DUR_UK_ID              )
    08:15:23   6  select
    08:15:23   7  14         ,
    08:15:23   8  TABLE_NAME             ,
    08:15:23   9  DUR_UK||'!'                 ,
    08:15:23  10  DUR_UK_ID              
    08:15:23  11  from key_ids 
    08:15:23  12  where table_name = 'PART' 
    08:15:23  13  and rownum <= 10;
    insert into key_ids2 partition for(14) (
                                      *
    ERROR at line 1:
    ORA-14108: illegal partition-extended table name syntax
    But by specifying explicit partition and subpartition works:
    08:17:45 GM_CS_CDR@oradev02> insert into key_ids2 partition (SYS_P15127) (
    08:18:23   2  DATA_ORIGIN_ID         ,
    08:18:23   3  TABLE_NAME             ,
    08:18:23   4  DUR_UK                 ,
    08:18:23   5  DUR_UK_ID              )
    08:18:23   6  select
    08:18:23   7  12         ,
    08:18:23   8  TABLE_NAME             ,
    08:18:23   9  DUR_UK||'!'                 ,
    08:18:23  10  DUR_UK_ID              
    08:18:23  11  from key_ids 
    08:18:23  12  where table_name = 'PART' 
    08:18:23  13  and rownum <= 10;
    
    10 rows created.
    
    08:18:24 GM_CS_CDR@oradev02> insert into key_ids2 subpartition (SYS_SUBP15126) (
    08:19:42   2  DATA_ORIGIN_ID         ,
    08:19:42   3  TABLE_NAME             ,
    08:19:42   4  DUR_UK                 ,
    08:19:42   5  DUR_UK_ID              )
    08:19:42   6  select
    08:19:42   7  12         ,
    08:19:42   8  TABLE_NAME             ,
    08:19:42   9  DUR_UK||'!#'                 ,
    08:19:42  10  DUR_UK_ID              
    08:19:42  11  from key_ids 
    08:19:42  12  where table_name = 'PART' 
    08:19:42  13  and rownum <= 10;
    
    10 rows created.
    We have succeeded by using the syntax of PARTITION for tables partitioned, but not sous-partitionnee.

    Any ideas?

    Thank you
    Mike

    Support of Oracle reproduced this issue. The resolution was to ensure cursor_sharing is set to "EXACT", we happened to use "SIMILAR" in this case due to a migration of 10 g and 11 g.

    Please visit 1481564.1 for more information.

  • States, how to access the components not included in the current state?

    I have two State put in place for my application. I have a creationComplete triggering my init function and a lot of listeners are then added here and there throughout the app. The only problem that I am running is that an element is not included in the default state, but I'm trying to add a listener to this component on my init function, and it gives me a runtime error stating that the component (which is not included in the default state) is a null object.

    How can I force this component is instantiated when the application is created?

    My best guess was to put a creationPolicy on 'something' to instantiate components "all".

    Thank you!

    See the section "Creation of Custom and Destruction policies ' of this specification:

    http://opensource.Adobe.com/wiki/display/FlexSDK/enhanced+States+syntax

Maybe you are looking for

  • Compatibility of proc error

    I currently have a desktop computer HP P6404y with a Phenom II X 4 820 running Windows 7 64 bit Edition home premium. My system was either not boot the operating system when I try and run a game or sit on it too long and have several things open the

  • HP Pavilion g series: administrator password to the power required for laptop

    Hello My phone requires me to enter a password administrator power. After three failed attempts, she gives me with the code: 67240200. Can you help me please? Thank you

  • I have XP, & can not update automatically or manually online when I try, I get error: 0 x 80070424.

    automatic updates is enabled, but nothing happens, I have also tried the new FIXIT but may not submit the results, was invited to come here, it seems to have started after that I got "windows security 2012 the virus" which I finally fixed it with 'ma

  • Error checking for software update for xperia z3v

    IM currently on android version 4.4.4 and I want to check for an update. When I click the system updates-> Check for software update, I get this error: "error while the DM session. I always get this error after performing a factory reset. Any ideas?

  • Contacts Windows and Merge Doc

    The Windows Contacts data base, I want to merge and print the information in the form of address book.  I created a merge document, but can only print a contact by page.  Is there a code that I can use for 'next record' so I have several people on ea