Why 2 similar codes - 1 works the other doesnt?

1st Code:
INSERT INTO DWCUSTOMERTEST
(CUSTOMER_KEY,CITY,STATE,POSTAL_CODE,GENDER,REGION,COUNTRY,OCCUPATION)
SELECT CUSTOMER_KEY.NEXTVAL AS customer_key, CITY, STATE, POSTAL_CODE, GENDER, 'N' AS REGION,
'Australia' AS COUNTRY, OCCUPATION FROM NAUSCUSTOMER
WHERE rowid NOT IN (SELECT row_id FROM ERROR_EVENT WHERE table_name='NAUSCUSTOMER');
THIS CODE INSERTS THE ROW PERFECTLY INTO DWCUSTOMERTEST
2nd Code:
INSERT INTO DWPURCHASESTEST
(PRODUCT_ID,TIME_KEY,C.CUSTOMER_KEY,SHIP_DATE,COST_PRICE,SELL_PRICE,
PURCHASE_PRICE,SHIPPING_CHARGE)
SELECT P.PRODUCT_ID, TIME_KEY, CUSTOMER_KEY, SHIP_DATE, P.COST_PRICE, P.SELL_PRICE, N.PURCHASE_PRICE, N.SHIPPING_CHARGE
FROM PRODUCT P, TIME, DWCUSTOMERTEST C,NAUSPURCHASES N
WHERE rowid NOT IN (SELECT row_id FROM ERROR_EVENT WHERE table_name='NAUSPURCHASES');
THIS DOES NOT INSERT INTO DWPURCHASESTEST. It gives the following error:
WHERE rowid NOT IN (SELECT row_id FROM ERROR_EVENT WHERE table_name='NAUSPURCHASES')
ERROR at line 8:
ORA-00918: column ambiguously defined
I understand the meaning of the error. But I don't understand what is wrong. Can someone please shine a light?

I have entered this code in:
INSERT INTO DWPURCHASESTEST
(PRODUCT_ID,TIME_KEY,CUSTOMER_KEY,SHIP_DATE,COST_PRICE,SELL_PRICE,
PURCHASE_PRICE,SHIPPING_CHARGE)
SELECT N.PRODUCT_ID, N.TIME_KEY , C.CUSTOMER_KEY , N.SHIP_DATE, P.COST_PRICE, P.SELL_PRICE, N.PURCHASE_PRICE, N.SHIPPING_CHARGE
FROM PRODUCT P ,NAUSPURCHASES N, DWCUSTOMER C
WHERE C.rowid NOT IN (SELECT row_id FROM ERROR_EVENT WHERE table_name='NAUSPURCHASES')
BUT i get 0 rows created. I don't understand why. In order for you to understand the situation better:
DWCUSTOMERTEST(CUSTOMER_KEY, CITY, STATE, POSTAL_CODE, GENDER, REGION,
COUNTRY, OCCUPATION)
DWPURCHASESTEST(PRODUCT_ID, TIME_KEY, CUSTOMER_KEY, SHIP_DATE, COST_PRICE,
SELL_PRICE, PURCHASE_PRICE, SHIPPING_CHARGE)
THESE are the 2 table schemas
CUSTOMER_KEY is a surrogate key. Several filters have been made and recorded to the ERROR_EVENT TABLE prior to this attempt at populating DWPURCHASESTEST.
Does anyone know how to solve my problem? If it aint clear, what other information do you guys need? Thanks so much

Similar Messages

  • Two ipods one works the other doesnt

    I have two minis one works and the other wont even get recognized when I plug it in to the USB port or the wall charger nothing appears on the screen it just stays dark. any help would be appreciated thank you

    T Bizzle,
    Please don't post your problems/concerns/questions more than once. I replied to your other post, not knowing that this was already here.

  • Firefox user when i try to access my gmail,orkut and yahoomail i get this error message Error code: sec_error_expired_certificate All the other sites are working fine please help Plugins installed:

    Firefox user
    when i try to access my gmail,orkut and yahoomail i get this error message
    Error code: sec_error_expired_certificate
    All the other sites are working fine
    please help
    Plugins installed:
    == URL of affected sites ==
    http://

     Hi,
    One of my ex-colleagues has installed a NI-DAQ 6.5 in our system. [And I do not see any other naitional instruments card in the CPU of the computer, may be he removed it] I deleted the account and all his files in the system. When I am trying to install version8.0, its not getting installed and giving me a message that I should uninstall the previous version by going to Add/Remove programs in the control panel.
    I tried doing that, but the "Change/Remove" button does not seem to work...[There is no response and so unable to install the new version...]
    Any idea how can this problem be solved?
    It is a windowsXP operating system with SP2 installed on a machine with P4 processor.
    Thanks

  • Why does my trackpad stop working, the batteries are fine.

    Why does my trackpad stop working, the batteries are fine.

    Try expanding your question a little bit.... how is it not working? Just saying it "stopped working" isn't really saying much.
    Like does it work sometimes and it intermittendly stops? Is the light on the power button not on?
    Does it sometimes not click things? (always remember the actual trackpad buttons are actually on the buttom of the trackpad so you have to give a decent click on the pad to make it work)

  • Iphone 4gs using cloud, will not push calendar changes back to my Windows 7 laptop. It will push contact updates perfectly but it won't push calendar updates. It will push updates from the laptop to the iphone, but it won't work the other way.

    My new Iphone 4s using the Icloud, will not push calendar changes back to my windows 7 laptop Outlook 10. It does perfectly push calendar changes from my laptop to the iphone, but it will not work the other way. We've checked the box in Itunes that says "sync the phone using WIFI" per the instructions from the Apple support people. any great ideas?
    "

    Ok, new info. This gets better and better.
    In OL2010, the Calendar in the navigation pane had no arrow indicating it had subcalendars within it. I right clicked on Calendar and chose New Calendar. It gave me a list of the existing calendars that were missing !!
    When I cancelled, there was an expand arrow next to Calendar in the Navigation pane !!!!!
    Expanding it showed the unchecked missing calendars. I checked them and synched again.
    WRONG THING TO DO! ALL my wife's calendar entries in her iPhone since the laptop went down 3 weeks ago DISAPPEARED. No warnings, nothing at any step of this process. The OL files overwrote the iPhone data.
    I can't find any way to get them back as this **** iStuff relies on iTunes for everything.
    Is there any way to get her files back from before this synch?
    Is there no way to save data files off the iPhone w/o iTunes?
    Why doesn't iTunes let you control the direction of data transfer?
    I now have one very ****** off wife.

  • HOW DO I SEND AN EMAIL ON MY IPHONE OR IPAD AND MAKE IT APPEAR ON THE MAIL APPLICATION ON MY MAC?   IT ONLY WORK THE OTHER WAY ---SENDING AN EMAIL ON MY COMPUTER ---APPEARS IN SENT ITEMS ON MY IPHONE AND IPAD.

    HOW DO I SEND AN EMAIL ON MY IPHONE OR IPAD AND MAKE IT APPEAR ON THE MAIL APPLICATION ON MY MAC?   IT ONLY WORK THE OTHER WAY ---SENDING AN EMAIL ON MY COMPUTER ---APPEARS IN SENT ITEMS ON MY IPHONE AND IPAD.

    IT IS FOR GMAIL.

  • My IPod is not showing up in my Itunes, I tried my phone as well and it is not coming up either.  I have tried everything including uninstalling and reinstalling.  It worked the other day but it is not working now.  Please somebody help me!!! What to do?

    Hello,
    Can someone please help me!?  I am trying to put music on my IPod and it was working the other day.  I can not get itunes to recognize my Ipod.  I have tried to unistall and reinstall Itunes.  I have tried all the steps on the site and can't get it to come up.  I tried my IPhone which was also showing up just the other day and it also is not showing in Itunes!   Please help me.  I need to be able to put music on my IPod for my work. 

    I have sorted it myself!!
    Ipod is now in the top right corner, last time I clicked on it, it ejected it but by clicking on the actual ipod icon then it brings up your ipod. I restored it to factory settings and synced all my music and it now works again. Hope this can help anyone who ends up with the same problem.

  • How does one do a two way contacts sync between an iphone and outlook? Most of the community has answered as this to be "always so", but it does not work! Changes made on outlook get done in my iPhone, but it does not work the other way around!

    How does one do a two way contacts sync between an iphone and outlook? Most of the community has answered as this to be "always so", but it does not work! Changes made on outlook get done in my iPhone, but it does not work the other way around!

    Close the tab the web page is loaded in (command - W).

  • Hi just noticed that 3g has gone from my i phone 6 plus i know it was working the other day , what do i need to do , spoke to 02 10 mins ago told me to call apple help

    hi just noticed that 3g has gone from my i phone 6 plus i know it was working the other day , what do i need to do , spoke to 02 10 mins ago told me to call apple help

    Try looking at this site.  https://downdetector.co.uk/problems/o2
    Looks like there are a few problems

  • HT4759 Hi I am trying to access my iphone notes from my desktop and they are not transfered? how do i transfer them? It is working the other way around - until I edit a note on my phone and then it is lost on my desktop? Help!

    Hi I am trying to access my iphone notes from my desktop and they are not transfered? how do i transfer them? It is working the other way around - until I edit a note on my phone and then it is lost on my desktop? Help!

    http://support.apple.com/kb/HT1296

  • I am not able to receive any phone calls but it does work the other way  so I can make calls - has anybody had similar problems ?

    Any time someone tries to call me my iPhone is ringing and when I want to pick the call I only get Tut Tut .... and on the other end people tell
    their end is dead and does not even give a ring tone....

    Hello,
    While your BB may not, while in your possession, have been part of a BES environment, it nevertheless likely has an IT policy in place as this is one of the key symptoms of that fact. If it ever was part of BES, then there are specific steps that must be taken to remove the IT Policy...just removing it from BES does not remove the policy. The process to remove it is totally destructive, so be sure you back up first. Also, when you restore, DO NOT do a full restore...rather, do a selective restore of only those things you need...if you do a full restore, you will simply put that IT Policy back onto your BB and be right back where you started.
    OK, so here is the procedure:
    KB14202How to remove an IT policy from a BlackBerry smartphone
    I always recommend Method 3 for PC and Method 4 for MAC.
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Why can i rotate screen and have sound at the same time.   Why is only option one or the other

    why cant i rotate and have sound at the sametime?  why does it have to be one or the other.   

    Do you really think it's not possible to do both and set them up the way that you want them to be set up? You just don't understand how the process works.
    System sounds can be muted and controlled two different ways. The screen lock rotation can be controlled in the same manner as well.
    Settings>General>Use Side Switch to: Mute System sounds. If this option is selected, the switch on the side of the iPad above the volume rocker will mute system sounds.
    If you choose Lock Screen Rotation, then the switch locks the screen. If the screen is locked, you will see a lock icon in the upper right corner next to the battery indicator gauge.
    If you have the side switch set to lock screen rotation then the system sound control is in the control center if you are running iOS 7. Swipe up from the bottom of the screen to get to control center . Tap on the bell icon and system sounds will return.
    If you have the side switch set to mute system sounds, then the screen lock can be accessed in the same manner as described above.
    This support article from Apple explains how the side switch works.
    http://support.apple.com/kb/HT4085

  • After updating two of my Ipod touch's to 5.1.1 both cameras refused to work, although after a few days one began to work the other one still refuses to open the shutter. I have tried resetting the Ipod, restoring and so forth. Does anyone know how to fix?

    I have tried restarting it, drainging the battery, resetting it to factory settings, restting the general settings and every possbile thing. The reason I need this Ipod to work is because although the first iPods camera does work, the screen is no longer responsive in the middle. HELP.

    If you restored to factory setting/new iPod and still have the problem time for an appointment at the Genius Bar of an Apple store.

  • New SMTP server has SSL. One of two Ethernet networked Macs works, the other doesn't. Help!

    We changed from Optimum to Verizon FIOS today. We have two Macs connected by Ethernet. The Mini running Mavericks and Thunderbird 24.6 was able to set the outgoing server as smtp.verizon.net on port 465 with connection security SSL/TLS with no authentication and it works fine.
    The other Mac is an ancient G4 running 10.3.9 and TB 2.0.23 and it does not accept running without authentication.
    With optonline, we ran on port 25 with no authentication.
    I tried putting in the user name and pw we entered on verizon.net, and that doesn't work. I tried the user name and pw from our pop mailbox, and that doesn't work. BTW, the incoming mail is working fine on both computers.
    What's going on? How do we fix it?

    But I don't know what user name and password to enter. When I enter the username and password from my Verizon account on the 2nd linked computer, it does not recognize it. Does it have to be entered on both computers? What do we select on the 1st computer running Mavericks? Normal password? Then do we enter our Verizon username and password?

  • Deleting songs in itunes does not work - the other forum did not help

    i have a new ipod (80GB)and i cannot delete anything from itunes. when i highlight and try delete/backspace nothing happens. when i right click on an item the menu that opens does not include a clear or delete option.
    please help?!?!?!?!/
    i went through all the possible options in the other forum
    http://discussions.apple.com/message.jspa?messageID=5481041#5481041
    and i got 8 or 9 replies - without any success.
    i have the latest itunes version and have it reinstalled again and again.
    the otions i get when highlight and right click on a song in the music section in itunes are:
    get info
    rating
    shoe in windows explorer
    reset play count
    reset skip count
    convert selection for ipod
    convert selection for apple tv
    uncheck selection
    mark as not new
    add to playlist
    show in playlist
    copy
    get album artwork
    apply sort field
    so there is no clear nor delete!
    how on earth can i get my list smaller????
    i am starting to think about all those lovely windows mp3 players.
    cheers - udo

    no idea what happened here but for a moment i was actually able to delete songs from my playlist which caused me to loose a few songs. i then closed everything off and restarted and now it appears to work. the strange thing is i haven't changed a thing. however i will closely monitor this and if it stays like this i have no further reason to get my fingers in a twist. as i said a mystery to me, anyhow thanks to all who were involved trying to help.
    cheers -udo

Maybe you are looking for

  • Can't copy file from SAP-directory to FTP server

    Hello, I can't copy files from the SAP server to the FTP server. The file is created with OPEN DATASET and CLOSE DATASET commands and is placed in the SAP-directory S:\usr\sap\DEV\DVEBMBGS00\work. I can see and read the file with transaction al11, so

  • [Success] Dual Booting Arch and Windows 7 [Advice / Confirmation]

    So I have been trying to get Starcraft II to work with wine and no luck. I have decided to install windows back on my computer, besides it might come in handy since I'm heading back to school soon. Anyways I have tried dual booting arch and windows i

  • Activated Acrobat 10 Pro requires re-activation

    I purchased CS5 about two months ago. After installing CS5 successfully, when I tried to install Acrobat 10 Pro, the installation won't accept the serial #. By the way, the PC had Acrobat 6 Pro on it which I uninstalled before installing CS5. Acrobat

  • Why pages is not seen as installed when I have it already installed in my mbp?

    I'll appreciate help for this, also I have to open twice a pages file always........is there a way just to double click a pages file once and open it? Thanks!

  • HP Z210 and compatibility

    Hello, I've been trying to install Solaris 11 on my HP Z210 x64 workstation but it is not officially supported, and it seems like the SATA on-board controller is the culprit as it's not recognized by the OS when it boots the live CD, can't get past t