Merge not functioning

Hi,
I have a table parameters where I store different parameters. Now, I created a merge statement, so that if the parameter exists, it is updated, else it should be created. The update works... the insert does not!
My parameters table consists of 2 columns: parameter (=parametername) and value (=value of the parameter).
merge into parameters p
using (select parameter, value
       from   parameters
       where  parameter = 'TEST') p2
on    (p.parameter = p2.parameter)
when matched then
update set value = 33
when not matched then
insert (parameter, value) values ('TEST',34)
;What's going wrong??...
Message was edited by:
Voxie2

It seems you want to make sure the record ('TEST',34) is in your parameter table. If it not there already, you want to insert the record, and if it is there, you want to make sure it has the value 34.
In that case the record ('TEST',34) should not be selected from the parameter table, because it might not be there and then your merge won't work. Select the record from dual and it will work:
SQL> create table parameters (parameter,value)
  2  as
  3  select 'parameter1', 1 from dual
  4  /
Tabel is aangemaakt.
SQL> merge into parameters p
  2  using (select 'TEST' parameter, 34 value from dual) input
  3     on (p.parameter = input.parameter)
  4   when matched then
  5        update set value = input.value
  6   when not matched then
  7        insert values (input.parameter,input.value)
  8  /
1 rij is samengevoegd.
SQL> select * from parameters
  2  /
PARAMETER       VALUE
parameter1          1
TEST               34
2 rijen zijn geselecteerd.
SQL> update parameters
  2     set value = 20
  3   where parameter = 'TEST'
  4  /
1 rij is bijgewerkt.
SQL> select * from parameters
  2  /
PARAMETER       VALUE
parameter1          1
TEST               20
2 rijen zijn geselecteerd.
SQL> merge into parameters p
  2  using (select 'TEST' parameter, 34 value from dual) input
  3     on (p.parameter = input.parameter)
  4   when matched then
  5        update set value = input.value
  6   when not matched then
  7        insert values (input.parameter,input.value)
  8  /
1 rij is samengevoegd.
SQL> select * from parameters
  2  /
PARAMETER       VALUE
parameter1          1
TEST               34
2 rijen zijn geselecteerd.Regards,
Rob.

Similar Messages

  • How do you work around code not functioning in loaded SWFs on iOS.

    Hi,
    I came across a post that suggested that in iOS, code does not function in loaded SWFs and a quick test demonstarted that this was true.  I'm just wondering if anyone has come up with a workaround for this.
    I'd appreciate any insight you can give me.
    Best,
    Chris

    Chris,
    The reason external SWFs with code in the doesn't work is that ADT cross-compiles your root SWF (and only your root swf) into objective-c code consumable by an iOS device.
    I created a workaround for this problem - as long as you embed your asset like this:
        [Embed(source="gameLevel.swf")]
          private var gameLevel:Class;
        addChild(new gameLevel());
    In this scenario, if gameLevel.swf has code in it, it typically wouldn't work in iOS, because new gameLevel() would create a Loader and interpret SWF bytecode.  But, if you first run the above SWF through my tool called SWFMerge, it will take your embedded SWF and merge it into your root SWF.  The result is that ADT will compile your code into objective-C, it will work on iOS, and note: new gameLevel() now results in an instance of your asset - NOT a Loader.
    The SWFMerge tool is here:
    http://www.onetacoshort.com/temp/SWFMerge_alpha.swf
    LMK if this workaround works for you or if you have trouble.  Cheers!
    -Jeff

  • Purpose of Merge Errors function ?

    I am looking at an example VI for a NI-HSDIO card. In this example, there is a Merge Errors. What is the purpose of using a Merge Errors function? Synchronization?
    Solved!
    Go to Solution.

    nyc wrote:
    I am looking at an example VI for a NI-HSDIO card. In this example, there is a Merge Errors. What is the purpose of using a Merge Errors function? Synchronization?
    I can't say how they're use in the NI-HSDIO example, but yes, the merge errors function is often used for basic synchronization of parallel tasks.  Take a look at the image I attached.  Here the Merge Errors function is used to make sure that none of the DAQmx Start Task VI's executes unless and until all of the DAQmx Create Channel VI's complete successfully.  Note that this screenshot is from 8.6, so the merge errors function might look a bit different.
    Mark Moss
    Electrical Validation Engineer
    GHSP
    Attachments:
    Merge Errors.png ‏7 KB

  • Shape modes Expand button not functioning

    Just installed CS4.
    When I merge object using the shape modes line in the Pathfinder palette the objects are not dynamically merged but rather merged as when I use the 'Merge' command from the 'pathfinders' line.
    This means the button 'expand' is not functioning either since the objects are already expanded automatically.
    Does anyone have the same problem and is this a bug or am I missing something?

    > The issue is that I would prefer the 'old' situation back
    And I was not arguing with your preference. (I don't share it, but you're enttitled to it.) You said Add To Shape and Merge do the same thing:
    > ...the merge function results in exactly the same as the simple merge using the pathfinder command. Two identical commands in this palette seem to be silly.
    They don't, and so the presence of both of them is not silly.
    You seem to think that the Shape Mode buttons are supposed to be just "live" versions of the Pathfinder buttons. They aren't. The Shape Modes are four basic set operations (union, subtract, intersection, difference), and can be applied as live or not. The Pathfinders are
    additional operations (each with its own set of sometimes bizarre behavioral caveats), and cannot be applied as live effects.
    But their being able to be applied as live effects, and whether live or expanded is default is immaterial as to whether one is superfluous or not.
    Merge Pathfinder is NOT the same thing as Add To Shape Area expanded. The two only happen to result in the same thing under the special circumstance of same-filled unstroked paths. Merge (its inability to handle strokes notwithstanding) is an important path operation for things very different from the purpose of Add To Shape Area.
    JET

  • Photosmart c309a- 'The wireless radio is not functioning, contact HP support'

    My Photosmart c309a wont connect wirelessly. Upon running the wireless network test, the report states, and I quote "The wireless radio is not functioning. Contact HP support". The report then states the following:
    Wireless on                    PASS
    Wireless working         FAIL
    and everything following that stated as 'not run'.
    Ive searched for other threads on the subject, and the only sloutions I can find are unplug the printer and plug it back in to reset it (made no difference), and try the HP print and san doctor (link was dead, found it manually and didnt work as it cant connect to or even see the printer on the network).
    So the question is, is this a hardware fault, and if so what can be done about it?

    Hello,
    Yes, it is an hardware issue and indicates that the Wireless card is not functional.
    Please call HP Tech Support for further assistance.
    If you are in US , the toll free # is 1-800-474-6836 .
    If you are not in US , then log on to www.hp.com , at bottom-left corner there is a world map icon, click on it and then select the region you belong to, which would then provide support options for you for that region.
    Regards,
    Jabzi
    Give Kudos to say "thanks" by clicking on the white star under my name.
    Click "Accept as Solution" if it solved your problem, so others can find it.
    I work for HP
    Regards,
    Jabzi
    Give Kudos to say "thanks" by clicking on the "thumps Up icon" .
    Click "Accept as Solution" if it solved your problem, so others can find it.
    Although I am an HP employee, I am speaking for myself and not for HP.

  • Error message saying a device attached to the system is not functioning

    i m getting an error message saying a device attached to the system is not functioning whenever i m trying to connect my pc to my smartphone. i tried all your options like uninstalling failed updates from my update history, checking if their is any flag
    in device manager option but nothing helped me.. plz solve my problem..

    Hi,
    Could you please have a share with your phone's information?
    Based on what I know, different phones may have different softwares developed by the manufacturer to make the connection through Windows operating system, we may check with the phone's manufacturer side and see if there could be some helpful information
    offered.
    Besides, please take a check with
    Event Viewer and see if any special errors logged there.
    Best regards
    Michael Shao
    TechNet Community Support

  • Bridge not functioning in PhotoShop CS3 Extended

    I deactivated Photoshop CS3 on a computer I was no longer using and installed it (CS3) another computer.  I activiated CS3 on the new computer.  However, when trying to use Bridge, I get a message that says that Adobe no longer supports Bridge Home and Bridge does not function on the new computer. Is there anything I can do to get Bridge to function as part of CS3 Extended?

    Thanks, that worked. 
    In a message dated 12/28/2011 10:13:56 P.M. Eastern Standard Time, 
    [email protected] writes:
    Re:  Bridge not functioning in PhotoShop CS3 Extended
    created by Curt Y (http://forums.adobe.com/people/Curt+Y)  in Bridge 
    Windows - View the full  discussion
    (http://forums.adobe.com/message/4107610#4107610)

  • Satellite P300D-110 integrated webcam is not functioning properly.

    Hello everyone,
    as the title says, the integrated webcam of my Toshiba Satellite P300D-110 is not functioning properly. Allow me to explain. Using the Camera Assistance Software I can take photo's and record music. If I try to record a video the preview screen turns up black and the end result tuns out black aswell, completely black.
    Whenever I try to use my camera with applications such as MSN Live Messenger, Skype or at community websites using Firefox, Internet Explorer or Safari the application in question crashes.
    *How did this happen?*
    You tell me. This is how it went;
    * Day 1: I've started up my laptop and looked at my fresh and clean install of windows vista home premium. I tried out my webcam using the webcam assistance software and it worked like a charm.
    * Day 2: Once again I boot up my laptop and try to start my webcam only to find out that it no longer functions.
    To give a quick summary of the thread;
    * Using Camera Assistance Software provided by Toshiba I can take pictures.
    * Using Camera Assistance Software provided by Toshiba I can record sound.
    * Using Camera Assistance Software provided by Toshiba I can _*NOT*_ record or preview a video.
    * I can not start my camera using any other application such as but not limited to; MSN Live Messenger, Skype, Mozilla Firefox, Internet Explorer and Safar.
    * I have downloaded and isntalled the latest drivers from the Toshiba website.
    * My laptop is about a week old.
    I'm not sure what more I can do, all I want is for the webcam to work, if anyone can help me out please do so.
    And if possible WITHOUT having to reinstall Windows Vista Home Premium.
    I haven't even used it and wouldn't want to make that a solution for all the problems that might occur in the future.
    Sincerely,
    a sad customer.

    Using Camera Assistance Software provided by Toshiba I can NOT record or preview a video.
    Can you please describe the steps how you try to do this? I must ask you this because it runs well on my notebook. When the recording is finished player opens and you can see recorded movie. It is avi format and at the top of this player you can see the path where the movie is saved.
    Most strange thing for me is that you cannot use it with Skype. Ok for MSN is not the perfect but there is absolutely no problem with Skype. Check the settings and it must work somehow.

  • My audio and cam is not functioning anymore.my laptop model is Satellite A200-130.what shall i do?

    im having a problem with my laptop.the audio and cam is not functioning.i dont know why/
    please help me what to do.do you think program files about these were deleted?

    Probably best to post in the Toshiba Support Forums Europe.
    -Jerry

  • Keyboard+trackpad not functioning at all on HP 2000 Notebook PC! please help!

    Tonight I turned on my laptop (HP 2000 Notebook PC) to find that the Keyboard and track pad was not responding, the only thing that worked was the wireless mouse.
    I can not find the product number but the name is HP 2000 Notebook PC, the operating system is Windows 8, I can't login to see if there are any error messages, the last thing I remember doing was trying to apply a new cursor image and it told me to restart and when I did I couldnt log back in or type anything at all, I could only use the mouse.
    Also the things I have tried to do are: Restart Computer, Take out batter and restart. (I cant do much because I can't type in password)
    All help will be greatly appreciated!
    UPDATE: I logged in using the On-Screen Keyboard, it seems like a hardware malfunction and not a virus because i cant find anything in my downloaded stuff that wasnt there before. So it is just a hardware malfunction.
    UPDATE #2: it says that the driver (for keyboard and touchpad) may be corrupt or missing and it says Code 39 in parenthesis.

    Hello Oceanlife,
    You state that the keyboard and touchpad are not functioning, that is correct? I will try to assist you with this issue.
    As of today are you still having this problem?
    If you have, any more questions do not hesitate to ask. .
    Thanks
    Clicking the White Kudos star on the left is a way to say Thanks!
    Clicking the 'Accept as Solution' button is a way to let others know which steps helped solve the problem!

  • Fairly certain that FileStream.writeObject() and FileStream.readObject() do not function - at all -.

    I've struggled with this since Jan 9th, 2013 (if not longer) and the only conclusion I can come to is that this simply does not function.  No matter what I try and no matter what resource (and I'm finding precious few) I follow to try to implement this within Flash Builder 4.7, Flex SDK 4.6.0 (Build 23201), AIR SDK 3.5, I only succeed in creating a file (with the correct name) that is 123 bytes in size that reads back in as NULL;
    I've tried using ByteArray.writeObject()/readObject() as an intermediary with FileStream.writeBytes()/readBytes(), with no luck.
    I've tried instantiating an object, setting properties and then using that.  I've tried instantiating my correctly formed ValueObject (including the remoteClass alias metadata tag).
    I've tried using -verbatim- the example provided in the top most suggested 'Community Help' resource http://www.switchonthecode.com/tutorials/adobe-air-and-flex-saving-serialized-objects-to-f ile It is worth noting that this solitary example of the procedure/SDK-usage is dated to Flex SDK 3.0 and at least 04/04/2009 (first comment on the article).
    My frustrating hell (one version of many methods attempted) is detailed on StackOverflow (including -all- mxml, as, and trace output), but so far, no assistance has been forthcoming, alas.  This is a severely stripped down and simplified version of what had been a far more complex attempt:
    http://stackoverflow.com/questions/14366911/flex-air-actionscript-mobile-file-writeobject- readobject-always-generates-null-w
    An earlier post* detailing a far more complex attempt interation, with, alas, just as little help (guess this isn't a hot button topic) forthcoming:
    http://stackoverflow.com/questions/14259393/flex-actionscript3-filestream-writeobject-fail s-silently-in-ios-what-am-i-doin
    * I previously suspected that it was only failing from within iOS on an iPad, but the first example (the stripped down version) made it evident that it didn't work in the AIR mobile device simulator (iPad) in the Windows environment, and indeed, didn't work in a non-mobile project in the windows environment AIR launcher.
    I'm at a loss, upset, frustrated, in major trouble with my supervisor/deadlines, etc.
    I would very much appreciate any suggestions/help/confirmation/etc.
    Just to move ahead with development I've opted for a far less preferable solution of writing out both an XML file and a JPG file.  I very much do not like this and very much want to store encapsulated serialized objects locally in the same way I assume will work for storing remotely with AMFPHP (if the project ever gets to that point *sigh*).
    Again.  Would be so grateful for any help.

    I want to add to this post as I marked it as "The Answer" though it does not indeed contain the answer directly, for those who come looking for simliar solutions.
    harUI prompted me to realize that my metadata term needed to be capitalized (RemoteClass instead of remoteClass).  As the metadata tags may be user defined, the compiler throws no errors (or warnings *grumble*)
    package vo
        import flash.display.BitmapData;
       // [remoteClass(alias="PTotmImageVO")] incorrect
       [RemoteClass(alias="PTotmImageVO")]
        public class PTotmImageVO

  • Multi-touch display is not functioning as normal

    multi-touch display is not functioning as normal on the right half of the screen....

    Hi James,
    Thx for the quick reply...
    I have already tried most of these troubleshooting steps but no go....
    Also, when you tap or use only the right half of the screen, the touch display is inconsistent and makes a wierd sound [ like a hollow tub or something ] and it's not a cosmetic issue...
    ----Apple store / Authorized Service Center is still working on this ongoing issue with no results and still not confirming for the iphone replacement...Thnx..

  • HP Photoprinter C7280 printer. The wireless radio is on but not functioning - so no wifi conection.

    HP Photoprinter C7280 printer. The wireless radio is on but not functioning  - so am unable to gain wifi connection and print! - Why?   How do I fix, Thanks

    I would guess that the printer's wireless radio has died.  Have you tried plugging the printer into your wireless router with an Ethernet cable?  It should work and give you the same functions as wireless.  Your computer or router will not care how the printer is connected.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • Can't detect or connect to my wireless network - Diagnostics says wireless radio is not functioning.

    Couldn't print; computer said printer was not connected.  Tried to reconnect to wireless network, couldn't connect.  Ran the Wireless Network Test Report, which said "the wireless radio is not functioning.  Contact HP support."

    Follow the instructions in the manual to reset the printer back to Factory Defaults. Now check the wireless radio status again. If the same, use the front panel to navigate and attempt to enable the wireless radio. Again, check the status after. If it still says it is not functioning, the wireless radio is indeed defective.
    Say thanks by clicking the Kudos Thumbs Up to the right in the post.
    If my post resolved your problem, please mark it as an Accepted Solution ...
    I worked for HP but now I'm retired!

  • OfficeJet Pro 8500 Wireless Radio is not functioning

    I had been using Office Jet Pro8500 Wireless for about 5 months.  All the sudden, I lost the network connection.  I had been in contact with HP Support and waiting for a call back from them.  We had tried to reset the network connectivity (unplug the computer, and press 6 and #) but not successful.  I am connected to my wireless network on my computer. I have 2 computers (one Windows 7 and the other Windows XP).  I use NetGear for my wireless router, 64 bit with WEP.
    I have been reading some messages in this forum, do I have a bad wireless radio in the printer?  I have been spending close to 2 hours with HP Support doing various thing, but no luck.  They suppose to call me back 1 1/2 hours ago but no one had called yet.  :-)
    Any suggestion?

    Hi,  thank you.   Yes, I have done that.  It says:  "The wireless radio is not functioning.  Contact HP support. " 
    Diagnostics Summary:
    Wireless On - Pass
    Wireless Working - Fail.
    Network Name (SSID) Found - Not Run
    everything else below here are "Not Run" . 
    Downlink count - 1
    I am on the phone with HP Tech Support.  I used your suggestion to tell them that I believe that I have a failed radio module in my printer.  They are going to send me a "refurbished" basic printer.  They assured me that the refurbished is a brand new unit, never used with any customer.  It is an overstock printer which they open and take out any accesories and ship it to me.  Hope this will work.  Hope this is true.
    PS:  HP asked me to pay for expedite shipping but I politely asked that they will waive the cost because it is a defective unit.  They did.  But I have to give my CC for "collateral" in case I do not return my defective unit.
    Waiting now for that replacement printer.
    Thank you for your assistance.

Maybe you are looking for

  • Check if a user has a specific role

    Hello, Is it possible to check if a user has a specific role in MII 12.0? For example if the user has the role "xmii Developers" I would do something more in a transaction than if the user doesn't have this role. Thank you for your help. Regards, Mat

  • Creation of Generic business Object for a standard transaction

    Hi, We have a requirement where we are depreciating the assets (standard transaction ABAA) using a custom BDC program. We need to maintain a history (called audit trail) for the particular asset that has been depreciated using this program. For this

  • '||' Operator in sql query

    Hi All, we are using the "||" operator in the sql query.At the terms of the performance,Is it beneficial or not? Please suggest me. Select * from emp where (ename||empno) in ('xxx'||'yyyy') Thanks in advance...

  • Remoting with CFC

    I'm using Flash remoting to send usage statistics from a movie up to a coldfusion component for processing and storage. System works great -- at least the individual calls are working -- but when I try to execute all these calls multiple times throug

  • How can I get a printer driver for the hp psc 2410 photosmart?

    When I tried toadd the printer, there was a message saying that the printer driver for the 2400 series was available, but when I tried to download it, I received an error message saying that I couldn't download it because of a network error.  My Macb