Help me out  to resolve a conditional problem----pls help

Hi Experts ,
I have the requirement in which if the apinumber is greater than or equal to 10 then only the rows should get inserted into the well_header_table from products_mv table.I need to use only merge concept and nothing else.
I am making use of the merge concept here .I am checking for the 10 digit condition during the updation part but same will be inserted into the well header table.This shouldnt happen .Can any one suggest me how can i filter out the insertion part so that it only inserts the rows which has api_number greater than 10 digits.I have marked my 10 digit condition that checks for the update part in bold form.
Pls help me out in resolving this issue .
regards
debashis
[\n]
CREATE or REPLACE PROCEDURE NAG.MERGE AS
BEGIN
merge into NAG.Well_Header_Table
using nag.products_mv
on (SUBSTR(nag.products_mv.API_NUM,0,10) = SUBSTR(NAG.Well_Header_Table.API_NUMBER,0,10) )
WHEN MATCHED THEN UPDATE SET
NAG.Well_Header_Table.WELL_NAME = nags.products_mv.WELL_NAME where nag.products_mv.API_NUM >= 999999999
WHEN NOT MATCHED THEN INSERT (NAG.Well_Header_Table.API_NUMBER,NAG.Well_Header_Table.WELL_NAME,NAG.Well_Header_Table.SECTION,NAG.Well_Header_Table.TOWNSHIP,NAG.Well_Header_Table.RANGE,NAG.Well_Header_Table.WELL_METER_NUMBER,NAG.Well_Header_Table.COUNTY_NAME,NAG.Well_Header_Table.OPERATOR_NAME,NAG.Well_Header_Table.PRODUCTION_FORMATION,NAG.Well_Header_Table.STATE_NAME,NAG.Well_Header_Table.FIELD_NAME,NAG.Well_Header_Table.WELL_FLAC_NUMBER,NAG.Well_Header_Table.WELL_LEASE_FLAC,NAG.Well_Header_Table.WELL_TYPE,NAG.Well_Header_Table.WELLBORE_PROFILE,NAG.Well_Header_Table.STATUS)
values (nag.products_mv.API_NUM,upper(nag.products_mv.WELL_NAME),nag.products_mv.SECTION,nag.products_mv.TOWNSHIP,nag.products_mv.RANGE,nag.products_mv.METER_NUMBER,upper(nag.products_mv.COUNTY_NAME),upper(nag.products_mv.OPERATOR),upper(nag.products_mv.PROD_ZONE),upper(nag.products_mv.STATE_NAME),upper(nag.products_mv.FIELD),nag.products_mv.WELL_FLAC_HZ,nag.products_mv.LEASE_FLAC,upper(nag.products_mv.WELL_TYPE),upper(nag.products_mv.WELLBORE_PROFILE),null);
END;
[n]
regards
Debashis

Try those selects below and look at your on condition
select substr('123456789',1,10) from dual
select 123456789 from dual where 123456789 > 999999999
-- perhaps
on (nag.products_mv.API_NUM = NAG.Well_Header_Table.API_NUMBER and nag.products_mv.API_NUM > 999999999)Regards
Etbin

Similar Messages

  • I have a 160GB Hard Drive in my MBP and use VMWare Fusion and had a 60GB Virtual Machine running Windows XP. Deleted the Virtual Machine and CANNOT find the 60GB space I desperately need!  Anybody out there with a similar problem?  Help!

    I have a 160GB Hard Drive in my MBP and use VMWare Fusion and had a 60GB Virtual Machine running Windows XP. Deleted the Virtual Machine and CANNOT find the 60GB space I desperately need!  Anybody out there with a similar problem?  Help!

    Thanks - Of Course the first thing I checked and did.
    Disc Utility reads as follows:
    Capacity : 159.18 GB (159,182,127,104 Bytes)
      Format : Mac OS Extended (Journaled)  Available : 11.47 GB (11,472,896,000 Bytes)
      Owners Enabled : Yes  Used : 147.71 GB (147,709,231,104 Bytes)
      Number of Folders : 139,540  Number of Files : 511,832
    Activity Monitor(Disc Usage) shows something quite interesting.  Mac HD and Ramanan (Main User) - My hard drive is only 160GB!  Would the retired engineer gentleman please note as well.  Many thanks. Rams

  • Every version of firefox 6 won't open, I just get that crash report. Every time this has happened I reinstall firefox 5 which works fine. Anybody out there have a similar problem, any help would be appreciated

    every version of firefox 6 won't open, I just get that crash report. Every time this has happened I reinstall firefox 5 which works fine. Anybody out there have a similar problem, any help would be appreciated

    I had this issue. I went to c:\program files (x86)\Mozilla Firefox\
    I renamed my plugins folder to plugins.old.
    It recreated the Plugins folder and all was good again. I have since reinstalled the plugins I've been prompted to install.

  • Boot problem == pls HELP

    I have use the utility disk and format the machintos drive , and use  Extended (Journaled , Encrypted) , it ask me for a password (typed the password, confirmed the password - done) ,  after that i tried to install a fresh copy of Lion (i waited to be downloded from apple.com - done) after that it said that the fresh copy it will be installed and it will reboot by itself -> done ... from here the problem it's starting .... now my macbook air , it dosent start anymore it keep showming me, instaid of the apple sign from the start , a sign like the one from ghost busters (but without the ghost in it ) , i have tried to boot from cd , from usb , nothing dosent seams to be working.
    If anyone know a solution to this problem, pls HELP! Thank you in advance...
    p.s. before i had 2 hard drives that show up when i press the ALT button (machintos hd and utility drive, or something like that) now.. the only thing that it's showing me is : mac os base system , and if i try to use partition magic or something else, from a usb, it will tell me something about a bootguard , but i don't know how to insert the password.

    Glad your issue is fixed. Thanks for the update!
    Click if you want to Thank someone. If Problem is resolved, so that others can make use of it.

  • How to solve this problem, pls help when I try to see remote camera system from home."Dual streaming is required for HTML viewing"

    How to solve this problem, pls help when, I try to see remote camera system(spec dvr) from home. The Error I get is "Dual streaming is required for HTML viewing"

    I had the same probelm and found that the problem lies with 64bit programs such as safari and microsoft internet explorer. I have resolved the issue on my PC based server by using a 32 bit ie and same on my mac by using the same running windows under parallels.
    So far the problem with the 64 bit side of it is still to be resolved.
    Hope this helps and gets you guys up and running until suchtime a 64 bit solution is found.
    Craig

  • Urgent: Sessions problem pls help me

    Hi all,
    Its already late to post this problem.pls help me urgently.
    I have a servlet & two jsp's. first i request servlet, it processes something and forwards request to my first jsp. In that jsp on a button click, i'm displaying a new popup by calling showModalDialog. this dialog gets data from the same servlet but it forwards to my second jsp.(second jsp can be seen in dialog)
    Now if i submit form from my second(dialog) jsp, the servlet reports that session has expired. I tried a lot but invain. any one who helps me is appreciated well by all of our forum.
    waiting 4 u r reply,

    It could be that you have cookies turned off and you're not using URL Rewriting.
    In J2EE, the first time your browser makes a request to the server, the server responds and appends a SESSION_ID parameter to the request as well as storing a cookie with the SESSION_ID.
    The second time your browser makes a request, the server checks for the cookie. If it doesn't exist it checks for the parameter. If neither exist the server assumes its the first time your browser has made a request and behaves as describe in the previous paragraph.
    In your case when you submit the form if you have disabled cookies and the action attribute doesn't have the SESSION_ID paramter appended to the url, the browser will assume it's a first request. The user will not be logged in, hence your session has expired error.
    To fix this you need to encode the URL in your JSP. You can use the struts html:rewrite tag or the HttpServletReponse.encodeURL method, or if you're using JSP 2.0 the JSTL c:url tag.

  • CiscoWorks Vs TACACS+ ??!! sw management problem--Pls help me out

    Hi Gurus,
    I have a query to ask on the software image management.Please help me out.
    There are many cisco devices in my client place, but only one device is creating a problem.
    it is 2950 catalyst switch. CiscoWorks is complaining that 'it has no image to import', when we run a job to fetch the image from the switch. but it has image under root directory of Flash. After going through RME troublshooting and tips , I came to know that the connection protocol is telnet and ssh. Then I add the following commands in TACACS+ (to allow CW2K) user which is a centralized authentication system for all user including CiscoWorks.
    Cisco has mentioned this error in following URL:
    http://www.cisco.com/en/US/products/sw/cscowork/ps2073/prod_troubleshooting_guide09186a008036dff2.html
    It looks like it is having difficulty to recognize the Flash (though it shows the files in the inventory) and at the same time, I am not sure whether the commands are complete.
    I allowed the following commands to be used by CiscoWorks through TACACS+:
    1. copy tftp flash
    2. copy flash tftp
    3. erase flash
    4. show version
    5. show flash
    Refer the URL: http://www.cisco.com/en/US/customer/products/sw/cscowork/ps2073/prod_troubleshooting_guide09186a008036dff2.html#wp1045599
    Screen shot of the error and Detailed inventory report of the device are attached here.
    Please help me out with your expertise whether it is a TACACS which is stopping CW2K to view the Flash and files? or it is a problem with CiscoWorks to see the Flash.

    This document describes the procedure to configure the CiscoWorks Hosting Solution Engine 1.8.1 (HSE) using ACS as a TACACS+/RADIUS authentication module.
    ACS TACACS+ Setup for HSE
    ACS RADIUS Setup for HSE
    On Cisco.com, see also the Administration chapter of the User Guide for the CiscoWorks Hosting Solution Engine 1.8.1.
    http://www.cisco.com/en/US/products/sw/cscowork/ps150/prod_connection_guide09186a00802b2bae.html

  • Im my lap has hard disk problem,how to resolve the problem,pls help me...

    Hello,
               I have hp pavilion dv4 lap,in this lap has some hard disk problem,when i am turn on the lap that screen shows this message "The smart hard disk check has detected an imminent failure.To ensure not data loss,please backup the content immediately and run the hard disk test in system diagnostics".
               After that i was diagnostics the system but no changes in the lap,,again again lap shows hard disk error(301).
               Then i  am chosen the enter option to start up the lap it take long time for openning the windows,after enter the windows that also shows about the hard disk  error in within few minitues,
               What can i do?
               This lap bought at 12-oct-2012 from malasiya,now im in tamil nadu,how to solve the problem please help me.

    Hello srhk. Thank you for posting on the HP Forums.
    I understand the hard disk is experiencing issues. Error 301 indicates the hard disk possesses a hardware defect. I would contact HP Phone Support for assistance, or purchase an equivalent hard disk.
    If you choose to contact HP, their options will be based on the warranty status of the computer. If you do not have this information, you can locate it at this website: http://h20566.www2.hp.com/portal/site/hpsc/public/wc/home?ac.admitted=1384280905804.876444892.199480...
    You can utilize this website to learn how to contact HP appropriately, based on your region: http://www8.hp.com/us/en/contact-hp/ww-contact-us.html
    Please let me know if you have any other questions or concerns.
    Mario
    I worked on behalf of HP.

  • TS1629 my iphone 4 is on no service and can't activate. anyone can help me out to resolve this issue

    My i phone 4 software is earased and now it can't activate because it say no service but sim is ok and working properly. I can't use to restor and update software due to sim activation error. please help me out.

    Hello there, Ashir Zia.
    The following Knowledge Base article provides some great steps to try for troubleshooting issues with activating your iPhone:
    iPhone: Troubleshooting activation issues
    http://support.apple.com/kb/ts3424
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • Weird Problem pls help.

    Hi guys I have a big problem that I can't figure out. See I have a PT880 Neo and on the mobo box it says it's VIA. But when I go to install the Hyperion 4 in 1 mobo drivers my system crashes. When I boot up I get a Bsod stating my graphics card is in an infinite loop and says the video driver for my card is the problem. Also when I go to install new hardware it doesn't detect it. I checked the bios and pnp is enabled. So I put a new network card in and it will only detect it in the top pci slot so is this some kind of glitch am I downloaded the right drivers? The hyperion 4 in 1's version 455vp1 pls help

    I need your full system specs + PSU specs.
    Read these guides as well >Moan Guide Power Supply Guide

  • Audio+Video Chat works but one small problem.Pls help.

    HI..
    as i had posted once before in a different query's thread, i have implemented audio and video chat using AVTRansmit2 and avreceive2.
    audio and video chat work well.By video chat i mean not only video but VIDEO+AUDIO as well.. just like usual yahoo video chat.
    But the problem is like this:-=
    I have given an option for user to switch from audio chat to video chat.
    now if a user first goes to audio chat and then switched to video chat,
    then the problem comes. When he's shifted to video chat i close down previous Audio chat by RTPManager.dispose() , i close the player and everything..
    and then i start Video transmit/receive "ALONG WITH" audio transmit/receive..
    No this time video starts but audio doesnt work ..
    it says"waiting for rtp data to arrive.... "
    The problem is that when this new stream of audio data comes, the receiver somehow thinks that its the same old stream since its from same transmitter IP.. and so it tries to UPDATE the previous stream.
    It means there is some problem with the close method or RTPManager.dispose() which should have disposed off all the stuff much before the new connection was made.
    PLS HELP ASAP>
    this is crunch time for my project.

    Hi anandreyvk . .
    well, i had tried doing removetargets and also, i had disposed RTPManager well. As it turns out the problem was not with any of it but it was the problem of me incorrectly passing RTPManager from AVReceive2 to AVTransmit2.
    Actually i am using just one RTPManager.. since i am receiving and transmitting on the same port.
    i've solved the problem but i am not sure if this is the right way .. what do you think ??
    is creating just one RTPManager {by that,i mean initializing it only once} a good idea ?? Since we are supposed to call both AVTransmit2 and AVReceive2 with the "LOCAL PORT" .. {which in itself is a matter of discussion though! } i and my project mate thought initializing RTPManager only once is a better option .
    Whats your take on all of this ?

  • All my send out email lost in cyberspace! Pls Help!

    Hi pp,
    Pls help me! I believe my Mail started to behave strangely when I update the latest security patch or OSX to 10.4.5 ... am using Mail 2.0.7 now...
    Everything look and work fine for my mail server... I can download all email that people send to me, and it's seems like I can send out email to my friends too...
    **** No! Mail seems to work fine when I try sending out email. No error msg, no blockage... everything looks just alright. But my friends have complained to me that they didnt received a single email from me...
    1.feeling something wrong, I called up my Mail server hosting company to check my mail and they say nothing is wrong.
    2. I do a roundtrip testing, by sending email from my own account to my own account. I send out about 10 over mail... nothing was received.
    3. I do a disk verification using Disk Utility. No error detected.
    4. Decided to download a third-party email client program to test, IT'S WORK!
    I can use other email client program to send out and able to receive!
    Conclusion is, if I use Mail to send out my email, it will send out but eventually disappear before reaching the recipient. Something must be wrong with my System or Mail... but I've run out of idea on how to solve it...am getting very desperate at the current situation... hopefully there are some genius or knowledgable kind soul fellow that can help me on this mystery error... hereby, thanks alot fto anyone who offer their help to me. greatly appreciated.
    Powerbook G4 12"   Mac OS X (10.4.5)  

    Nothing in any update should have caused this, and clearly has not for most people -- therefore we should seek an answer aside from waiting for some unknown update.
    What type of account do you have -- POP, IMAP or .mac. In Mail Preferences, what are the selections in Mailbox Behaviors for this account?
    In the Finder, open Home/Library/Mail/Mailboxes -- is there an Outbox.mbox folder, and is it represented by a blue Icon? At Home/Library/Mail/this account folder, are there both a Drafts.mbox folder, and Sent Messages.mbox folder, and are both blue icons?
    More info, please.
    Ernie

  • Import problem,pls help!

    Hi,there,
    I'm new guy here,I'v got a problem about Import in table mode,I found I can import back all records successfully, but it just appends all records into the orignal table,not overwrite
    it,for example, I made a export for a table with 2 records, after then I added some records into that table,
    finally I made an import for that table, I found the
    total of records is not recovered to 2,but just append
    the records from export file,why can't I recover it to 2
    record? pls help me,thanks!

    All that import does is to run a bunch of SQL statements based on the content of the export file. If you look at the export file in an editor (if its small), or through type (on Windoze) or more on *NIX you will see stuff like:
    CREATE TABLE x STORAGE ( ...)
    INSERT INTO x col12,col2, ...
    VALUES (:b1,:b2, ...
    If you give imp the paramter ignore=Y, then the error generated by the CREATE TABLE (table already exists) will be suppressed, but the ata will be inserted. Note that there are no DROP TABLE or TRUNCATE TABLE commands in the export file.
    If you want to restore your database to a particular point in time using import, then you will need to manually drop or truncate the tables first. You can generate the required sql from the data dictionary. something like
    SET lines 1000 pages 0 feedback off trimspool on;
    SPOOL drop.sql;
    SELECT 'DROP TABLE '||table_name||';'
    FROM user_tables;
    SPOOL OFF;
    @drop.sqlHTH
    John

  • Upgradation problem pls help

    I imported my oracle 8.1.5 database dump in oracle 8.1.7 but when I want to connect to my instance thru a client machine one error message comes as "
    problem in connecting to the database, check whether it is started or contact sys admin" whereas the database is in open state.
    Then when I connected to sqlplus at the server, it gets connected but some messages also come as below"
    ORA-06553: PLS-213: package STANDARD not accessible
    Error accessing package DBMS_APPLICATION_INFO
    ERROR:
    ORA-06553: PLS-213: package STANDARD not accessible
    Could anyone pls help..

    What is the result of
    SQL> show parameter PLSQL_V2_COMPATIBILITY
    ?

  • Serious problem. pls help !!!!!!!!!

    some "khar, khar sound is coming from below of the keyboard of my hp g6 pavillion 2231 all the time when the lapton is on. what to do. i am fed off of that noise. pls help!!!!!!!!
    This question was solved.
    View Solution.

    Hi 
         Sorry khar khar ????   Mainly any sounds from under the keyboard would be Fan or HDD either way could mean either the Fan ( if fan ) is struggling to move due to dust build up OR the hard drive is failing  ,,, It's difficult to give you a firm answer without more information . Can you tell the difference between the fan noise and a hard drive noise ?? When you start up from cold does the noise start immedietly or is it only heard after say 5-10 minutes ??????           Checkurtech
    ****Click the White Kudos star to say thanks****
    ****Please mark Accept As Solution if it solves your problem****

Maybe you are looking for

  • How to decide the development platform for developing portal content?

    Dear Experts There are several platforms on which we can make portal contents for SAP Portal. 1)Web Dynpro for Java 2)Web Dynpro for ABAP 3)PDK for .NET I am trying to find out which of them would be most efficient while developing system for the cli

  • Purchased song but player won't play it

    Hello everyone, i purchased a song on the i-tunes store. My problem now, my player wont play it, i also transferred it onto my i phone- same problem....????HELP please!

  • Readind APO tables from ECC ABAP program

    Hi, I want to know if it is possible to read APO tables from a ABAP program in ECC 6.0. If it is possible , please lt me know how? Regards

  • Need some help with apple id?

    i just gave my apple id and password to a friend, he needed it to update his apps and then he went away for some work, but i forgot to log out of his phone. Does he will be able to use my id or it will ask for the password whenever he opens up the ap

  • You can not install the update "iTunes" [10.6.3]

    Hi everyone, on  my MacBookPro  a few days ago the itunes suggest me an update to 10.6.3. After the verify procedure/download,as every time ,comes the windows within the installation info, but when i start the installation (from the button) comes a p