Emulate nvl2() ?

I have a procedure that uses the nvl2() function of ORACLE 8.15 that I need to create in a 8.0.5 database. Is it possible to emulate the nvl2() function somewhoe differently? (e.g. via nvl() or decode() ?)

Something like this what you are wanting?
SQL> variable v_test varchar2
SQL> select decode(:v_test, null, 'null', 'not null') result from dual;
RESULT
null
1 row selected.
SQL> exec :v_test := 'a';
PL/SQL procedure successfully completed.
select decode(:v_test, null, 'null', 'not null') result from dual;
RESULT
not null
1 row selected.
SQL>You could wrap that in a function or procedure to do what you want I think...
- Mark

Similar Messages

  • I was able to copy all my files from my Time Capsule, but that is all they are...files. How do I get my new Mac Mini to emulate my other Mac?

    I was able to copy all my files from my Time Capsule, but that is all they are...files. How do I get my new Mac Mini to emulate my other Mac?

    Doggiemommie,
    Copying files is not a good idea.
    The "other Mac" was backed up onto Time Capsule using the Time Machine. On your new Mac you should restore the old user - rather than copy files manually.
    This usually happens during the initial setup of the new computer or you can do it later using Migration Assistant.
    Please note, it is possible to damage backup file on the Time Capsule when you browse it and copy files manually.
    Hope this explains.
    TZ

  • Any ideas on how to emulate this look (purposely bad looking video)?

    so i'm doing a very short sequence right now, and i thought it would be kind of interesting to have this short sequence have the same characteristics of the video quality of the old early 90s Sega CD based FMV games (for an example, i uploaded a short clip here: http://www.sendspace.com/file/ro17qv ). and there is a LITTLE bit more of a technological explanation here ( http://en.wikipedia.org/wiki/FMV_game#Description ) in the 3rd paragraph. from reading from here ( http://en.wikipedia.org/wiki/Sega_cd#Reception ) it would seem the video quality may have been better, natively on the disc, but the system itself could not actually interpret that quality of video. (i had alwasy just assuned it was compression artifacts to cram a 90 minute full motion game onto a proprietary 500mb cd-rom disc... but that may still have something to do with it) or maybe they just encoded the video liek that, knowing the console couldnt do it anyway, and being more mindful of bit-budgeting.
    so, is there anyway to really emulate that look? i tried encodeing a simple mpeg at 1 mbps, but it just made it more pixelated... didnt quite give it the grainy factor, charecterisic of dithering (which i was looking to see if there was just a simple color dither filter where i could limit it to the sega cd color threshold, but no luck on my part), nore the washed out colors i was looking for. i tried adding some noise... but then the grain was just random. where as in the games, the grain was more stagnate. (ie, the camera may pan, but you could still see the grain in the exact same place on the screen)
    or is this just something that was inherent to the hardware, and no real way to fully emulate it without said hardware?

    I'd experiment with Posterize Time to get the low-frame rate look; seems that most of the CD-ROM games with video had frame rates of around 10-12 fps. Posterize Time will let you achieve that pretty easily.
    Instead of Noise, try Mosaic with the block count sent relatively high. Use Posterize to create the color banding. You might have to experiment with the order of the effects, and also the level to which they are applied. A color correction effect as the last step would be necessary to get the desaturation you're probably looking for.
    Another quick-and-dirty way would be to export your sequence using Microsoft AVI as your Format, with Microsoft Video 1 or Microsoft RLE as your codec. For MS Video 1, click Codec Settings and turn the "Temporal Quality Ratio" down a bit, and for both codecs, decrease the Quality slider. Set your export frame rate to something that is 1/2 to 1/3 of your original sequence frame rate. That should create a pretty schmeggy looking file Again, mix-and-match to get your desired look, but this might be the easiest way to do this--these videos would have used codecs like this (Cinepak was popular, too).

  • Is it possible to use Mac's Bluetooth and emulate a phone ?

    Does anybody know if it is possible to use the Mac and have the Bluetooth interface emulate a phone? Doesn't matter that much which phone model/type.
    Background: I have a Nokia 6021, it has a Bluetooth interface and it pairs properly with the Mac. I can browse the phone and backup all addresses from it. No problem.
    Now I have a new car, the Toyota Prius 2006, which has a Bluetooth connecting and functions as a headset for the phone, No problems either.
    But then the Prius has it's own dictionary of addresses and phone numbers, which it can use via the fast select function, and you can fill them from the phone. No problem, except for one thing: the Nokia is only able to sent one phone number at the time and to do so the coneection has to be broken, re-established, sent it, broken, re-established, and then one number is done. I did the most urgent ones, but for more then 200 numbers in my phone.... Pwoeiwie....
    The problem is that Nokia does one at the time, I checked, no other possibility. A thought came to my mind to connect the Mac, use iSync, etc. But the Prius only accepts a device which identified itself as a phone.
    Anyone knows if this can be done, and if yes wants to tell me? Please do so, thanks in advance for heaving read this!
    Regards,
    Wim.

    Hi Julian,
    I'm not exactly sure how to interpret your question. Let me try:
    1. As a user, you set the car in receive mode. At that point you can sent an address or a bulk of addresses. But the phone only sends one at the time. I checked with Nokia, they confirmed it just cannot do it otherwise.
    2. If you ask for the message format or the technical data structure, it works when I sent the address as a "Business Card" from the phone to the car.
    3. This is not yet relevant because the car yet refuses to connect because the Mac is not seen as a phone....
    Regards,
    Wim.

  • How I can emulate Solaris 10 sparc on a Virtual Machine?

    Hi for all.
    Guys, I need to emulate an environment Solaris 10 in my job. We have an application that just run in this kind of environment. But, I found some problems when I try to install Solaris 10 Sparc on Virtual Box. I think that the problem is the type of architecture that are differents.
    So, someone knows a way to emulate Solaris 10 sparc architecture on a Virtual Machine. Doesn't matter the Virtual Machine application (Virtual Box, VMWare, etc..). Somebody Help me?

    HI Srini_Chavali
    I'm using the Solaris 10 u11.
    In fact, Virtual Box supports Solaris u6 and higher. I have an installation of Virtual Box running Solaris x86. But, the problem occurs when I try to create a Virtual machine to work with Solaris 10 Sparc architecture.
    The errors that appears on the screen are:
    "No bootable medium found! System Halted" and "FATAL: Could not read from the boot medium! System halted"
    This error occurs just with Architecture sparc.

  • How to downgrade to/emulate/triple boot OS X 10.8?

    I don't know if this belongs to OS X 10.9 or not but I will post it here.
    I have got an old program I need to use using my OS X 10.9.3 macbook pro and it kept crashing. I believe it's something to do with OS X 10.9.3. so I want to emulate OS X 10.8 in VMWare Fusion (Yes I think it's "legal"),triple boot OS X 10.9.3,10.8.4 and Windows 7 (got custom windows 7 dual boot without bootcamp already) or downgrade to OS X 10.8 (I prefer emulation over downgrade, since I got the new iTwerks).
    BTW it says check if it's compatible or something.
    BTW partition table:
    EFI|OSX10.9|Windows7
    Edited to add triple boot as an alternative for me
    Edited to add something

    You can run Mountain Lion in a virtualization solution, providing the underlying operating system is OS X on Apple hardware. As you are on Mavericks, I would use the most recent VMware Fusion version. Adding compatible memory to your Mac will not void your warranty.
    If you previously purchased Mountain Lion from the OS X App Store, and the same Apple ID is associated with your MacBook Pro, then you can download Mountain Lion installer again. You will likely need to create a USB stick installer and aim Fusion at it.

  • Decode or nvl2 or case functions

    create a query that displays employees lastname and commission amounts.if an employee does not earn commission,put "no commission."label column comm
    Sample Output
    lastname comm
    king no commission
    abel .3
    Note:The column commission is of number datatype

    Hi,
    This looks an awful lot like homework.
    If you're really stuck, post your best attempt so far, and a description of what you think is wrong with it.
    The assignment itself, "Decode or nvl2 or case" gives you three different ways to do this.
    CASE is a lot more useful in general, so I suggest learning how to use it first.
    NVL2 is a little more concise for this particular problem.
    DECODE can do anything CASE can do, often with a lot more coding. Unless it's required for your schiool work, I don't suggest using DECODE.
    You'll probably need to use the TO_CHAR function, to convert the commission to a string, so that whatever kind of expression you use (CASE or NVL2 or DECODE) it will always return the same datatype: VARCHAR2.
    All built-in functions are documented in the SQL Language manual:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/index.htm
    Actually, CASE and DECODE are not functions, but they're described in the same manual,.

  • Phonegap 'Build and Emulate' never works, tons of errors

    DReamweaver and Phonegap no longer work for me either and I do have Phonegap 1.2.0

    I'm not able to 'Build and Emulate' or 'Build' in Dreamweaver CS5.5 either.  When I upgraded to ios5, it never worked again.  Phonegap and Adobe are all about the dreamweaver integration and it doesn't work!  Here is the Build Log Fail that I've been getting for 2 months:
    /DW_NAF/PhoneGapLib/Classes/Camera.m:178:13: error: type of property 'returnType' ('unsigned int') does not match type of ivar 'returnType' ('enum DestinationType') [3]
    @synthesize returnType;
                 ^
    /Users/TuTone/Documents/DW_NAF/PhoneGapLib/Classes/Camera.h:25:23: note: ivar is declared here [3]
             enum DestinationType returnType;
    Please don't post a question in more than one place. Instead, just create your own thread.
    Try the workaround posted by "london1a1" here:
    http://forums.adobe.com/message/4002753#4002753
    The camera.h file mentioned is stored in /Applications/Adobe Dreamweaver CS5.5/Configuration/NativeAppFramework/DWPhoneGap/iphone/PhoneGapLib/Classes/.

  • Is there a way to make a G4 emulate a G3?

    Hi All,
         I recently purchased a new game, read through the specs and found that the minimum requirements is a G3, having a G4 I thought that I was safe. After I installed the game I get a yellow band on the screen at various locations making the game pretty much unplayable, so I read the "Problem" pages. In the fine print it stated that it was not compatible with G4 
         Is there any way I can make my G4 go into a G3 mode or emulate a G3?
         Thanks for your time.

    Quote from: Rassilon on 06-December-06, 15:54:17
    Not quite the answer that I was hoping for, but I understand what you are talking about.
    After reading your reply for the first time, I had a look for a new card and the AGP 6600 seems to be good value for money (a $15 game it about to cost me $145 in total ). My MB is only AGP 4x, but that should still run and at least I have a video card that I can move into a new system if/when I need to.. But then again, the way technology goes, it'll be obsolete by then too...
    Thanks for the swift response... 
    Try to find something like x800gt(o) @ xt to your agp slot, i bought one for 140€. Should kick ass 6600 cards. You should also be able to play new games with it for next year or two, when you next time have to upgrade there's no agp cards left that are more powerfull so then u just have to roll for pcie.
    I actually tried to save my old x800xt, but my new asrock dualvsta board (agp + pcie) burned my agp card, so I just had to buy new pcie card and I changed the board to msi, no more burning hw

  • How to emulate CSS fixed position in Flex 3

    Does anyone know how to emulate CSS fixed positioning in Flex 3?
    Canvas (absolute layout) uses coordinates same as HTML/CSS absolute positioning.
    How do I achieve fixed positioning where the panel is taken out of the flow and positioned relative to the application chrome?  (similiar to applicationcontrolbar, but not exactly)
    Someone please tell me if it is possible and some ideas how to achieve.
    Mike

    do not use the forum as marketing place for you site. if you want to share the content with SDN users, you have the blog area, wiki, article area.
    raja

  • CS5.5 PhoneGap build & emulate fails with sample template

    Hi. I've just upgraded to CS5.5 and opened the sample PhoneGap mobile app template and saved it as a new site. I set up the app settings and DW downloaded the SDK for me. I selected "build & emulate" and the emulator booted up Android 2.2. Meanwhile DW is still saying "Waiting for Android emulator to boot". It stays like that indefinately until I click on cancel and says "DW is unable to open 'mytestapp' in the emulator. Please consult the build log...".
    According to buildlog.log the build is successful taking just 10 seconds but after that it says:
    <DW>
    set ANT_HOME=D:\PROGRA~1\Adobe\ADOBED~2.5\CONFIG~1\NATIVE~1\APACHE~1
    set ANDROID_HOME=D:\PROGRA~1\ANDROI~1
    set JAVA_HOME=D:\PROGRA~1\Adobe\ADOBED~2.5\JDK
    set PATH=%JAVA_HOME%\bin;%PATH%
    cd D:\PROGRA~1\ANDROI~1\PLATFO~2
    D:\PROGRA~1\ANDROI~1\PLATFO~2\adb.exe kill-server
    </DW>
    Waiting for Android emulator to boot
    <DW>
    set ANT_HOME=D:\PROGRA~1\Adobe\ADOBED~2.5\CONFIG~1\NATIVE~1\APACHE~1
    set ANDROID_HOME=D:\PROGRA~1\ANDROI~1
    set JAVA_HOME=D:\PROGRA~1\Adobe\ADOBED~2.5\JDK
    set PATH=%JAVA_HOME%\bin;%PATH%
    cd D:\PROGRA~1\ANDROI~1\PLATFO~2
    D:\PROGRA~1\ANDROI~1\PLATFO~2\adb.exe logcat 2>&1
    </DW>
    * daemon not running. starting it now on port 5037 *
    * daemon started successfully *
    - waiting for device -
    error: more than one device and emulator
    - waiting for device -
    error: more than one device and emulator
    - waiting for device -
    error: more than one device and emulator
    ...repeats about 200 times
    The emulator itself works well but I just can't get DW to get it to run my newly built test app. Is this a bug in DW or something I can easily fix please? Failing that, how can I manually get the emulator to run my app?
    I copied the apk file to my real Android phone and installed it but it complains that files are missing when I run it. I'm not having much luck! Thanks in advance for any solutions or tips.
    Gary.

    Step1: You can run emulator android apps. it well error
    Step2: You keep you keep running the emulator, then again you debug
    I also encountered this error and now understand that to debug.
    wish you success

  • Emulate Two-Phase Commit

    HI,
    <Mar 20, 2009 8:25:32 AM EDT> <Error> <HTTP> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@1c1ac17 - appName
    : 'lms-app', name: 'lms', context-path: '/lms'] Root cause of ServletException.
    javax.ejb.EJBException: nested exception is: javax.ejb.TransactionRolledbackLocalException: EJB Exception: ; nested exception is: javax.ejb.EJBException:
    nested exception is: javax.ejb.CreateException:
    nested exception is: java.sql.SQLException: Connection has already been created in this tx context for pool named ejbDS. Illegal attempt to create connection from another pool: liveDS
    I enabled Emulate Two-Phase Commit option for both the datasources ejbDS and liveDs. But still this error is coming in weblogic 9.2.2.
    Can anybody suggest?
    Thanks
    Naveen

    Hi Venki,
    I have encountered the same issue for WebLogic 10.3.Speculating that you have fixed the error for 9.2, could you please provide your inputs on how to fix these kind of issues.
    Thnks
    Pavan

  • How can I emulate Windows on a PowerBook G4 12-inch?

    Hi,
    To emulate Windows as described below, do I need a virual Windows software or is there a setting I can use?
    Quote:
    IBD Charts are viewable on a Macintosh computer if it is configured to emulate a 32-bit Windows environment (either hardware or software format). The only requirement is an emulation processor speed of 133 MHz or greater.
    Unquote

    The only way you can emulate Windows on your PowerPC-based Mac is by using Virtual PC from, gross, Microsoft.
    The latest version (and last to come out) is Virtual PC 7. And you have to have your own copy of Windows to install on your PowerBook.
    If you have an Intel-based Mac, then you know what that spells out to. Native mode or virtualization at higher speeds than on a PowerPC-based Mac.

  • Tip: How to emulate Photoshop-style curves in Lightroom

    We all remember the days of Lightroom 1 and the term "Adobe red", when lots of people shouted about how their in-camera color is superior to Adobe's rendering. These days are long forgotten, now that we have the DNG color profiles, introduced with Lightroom 2. So, now, if you use the appropriate profiles, the default rendering almost matches that of camera manufacturers.
    However, there's one aspect of color quality that, from time to time, reminds me of legacy ACR color. That is when you start adjusting and make more or less strong adjustments with Curves, Contrast slider or other tonal controls.
    See how a contrast boosting S-curve shifted the skin tones towards warmer tones in Photoshop and how they look muddy-yellow-greenish in Lightroom?
            Original.
            Lightroom (left) and Photoshop (right).
    I have noticed that warm colors (orange and everything around it) are more affected. Skin tones and some other objects (e.g. wooden furniture) fall in this category. The difference between other colors (blues, greens) is much smaller between Lightroom and Photoshop.
    This happens because, curves in Lightroom have been programmed to be smarter and said to have a hue lock. That is, unlike curves in Photoshop or any other program on Earth, where curves affect the luminance, as well as saturation and hue, curves in Lightroom are mostly luminance-based, have a moderate saturation boos and minimal or almost no hue shift. This is described in more details here, here and also confirmed here. Most experts in the field consider Lightroom's implementation to be superior to Photoshop's, because it better preserves the original color.
    However, in my tests (you also can easily check HSL values in Photoshop) I have found that not only the skin tone hues will not shift towards a warmer red like in Photoshop, but they will actually shift in the opposite direction — towards yellow and green. Below you can see the hue values of the marker in the photos.
    If you, like me, happen to hate those muddy yellow/green skin tones in the shadows, you now have a way to get rid of them. The trick is to emulate Photoshop-style curves in Lightroom. Now that we have per-channel R, G and B curves in Lightroom 4, we can do this by using them instead of Contrast slider or the old composite point curve.
    If you find that this method twists the hues too far (e.g. faces are getting too red in the shadows), you can use something intermediate: a blend between moderate R+G+B curves and some Contrast slider. I personally like something in-between Lightroom and Photoshop.
    And finally, you need to adjust the three R, G and B curves so that they match perfectly to avoid losing color balance. It's very hard to do it in Lightroom, since there are no number input boxes for curve points. So, it's better to adjust one channel, and then carefully copy it to other in a text editor. I have prepared a collection of R+G+B contrast-boosting curves of different intensity: form Normal to Ultra Strong. You need to place the in your ACR's Curve preset folder. On Windows, it's \Users\<userprofile>\AppData\Roaming\Adobe\CameraRaw\Curves.
    Download RGB curves

    Thanks Dorin - I've downloaded but not yet scrutinized. -Rob

  • What happened to nvl2(fdate, sysdate-fdate, sysdate)

    Hi guys,
    Oracle 11.2
    I just found this by chance:
    SQL> create table tab_0417(fid number, fdate date);
    Table created
    SQL> insert into tab_0417 values(1, date'2012-01-01');
    1 row inserted
    SQL> insert into tab_0417 values(1, NULL);
    1 row inserted
    SQL> commit;
    Commit complete
    SQL> select fid, fdate, nvl2(fdate, sysdate-fdate, sysdate) from tab_0417;
           FID FDATE       NVL2(FDATE,SYSDATE-FDATE,SYSDA
             1 1/1/2012                  107.580358796296
             1                            2456035.5803588I expected an exception since the second and the third parameter of NVL2 have different data types and cannot be converted implicitly. But it executed successfully, and got a strange number 2456035.5803588, could anyone explain it?
    Thanks in advance.

    IMHO, it is bug:
    If the data types of expr2 and expr3 are different, then Oracle Database implicitly converts one to the other. If they cannot be converted implicitly, then the database returns an error.In:
    NVL2(NULL, 1, SYSDATE)expr2 is 1 - numeric and expr3 is date. Date can't be converted to number. In:
    NVL2(NULL, (SYSDATE+1)-SYSDATE, SYSDATE)expr2 is (SYSDATE+1)-SYSDATE. On one hand:
    SQL> create table tbl as select (SYSDATE+1)-SYSDATE x from dual;
    Table created.
    SQL> desc tbl
    Name                                      Null?    Type
    X                                                  NUMBERBut on the other hand:
    SQL> select dump(1),dump((SYSDATE+1)-SYSDATE) from dual;
    DUMP(1)
    DUMP((SYSDATE+1)-SYSDATE)
    Typ=2 Len=2: 193,2
    Typ=14 Len=8: 1,0,0,0,0,0,0,0
    SQL> We all know that subtracting two dates produces number of days between them. However internally oracle keeps distinction of a "number" number and "date diff" number. As you can see, internal type for "number" number is 2, while expression "date diff" internal datatype is 14. So it looks like NVL2 (and NVL or maybe even more built-in functions) treat "date diff" differently and allow date-expression conversion to "date diff" by treating date-expression as date-expression - date '1-1-1'.
    SY.

Maybe you are looking for

  • How to enable a plug-in to load in previous versions of Acrobat

    We need to run a plug-in compiled with Acrobat 9 SDK under Acrobat 7.  However, when I copy my plugin to the Acrobat 7 plug-ins directory and open Acrobat, it gives an error saying Plug-in is incompatible with this version of Acrobat. Please let me k

  • Is it possible to play a Flash movie in a 63" HDTV monitor

    Dear all, Hope my questions are make sense! Firstly, is it possible to sync the Flash movie on a 63" HDTV monitor from a PC notebook, but also keeping the quality of the graphic (I am afraid the graphic will look blury when display on a large monitor

  • DOCUMENT SETTING that ALLOW FUTURE POSTING DATE does not work in PL34

    Hi Expert, I am now using SAP B1 2005B (7.40.252) sp:00 pl:34 and realised that the ALLOW Future Posting Date was not working.  I still can remember while I was using pl:11 at B1 2005A, there is no such problem and wish to know when can the bug fix u

  • MacBook Pro crashes with kernel errors

    Hi, i'm havinge troubles with my 2009. macbook pro. It keeps crashing down with kernel errors. I took it to apple, payed for a repair and they didn't fix it. Now i don't know what to do. I recently noticed that my right fan isnt working. I'm leaving

  • The best tool for the A1 (on ICS) root

    Here I found and tried a tool for geting my A1 (with ICS) root: http://www.unlockroot.com/ I've got my A1 root with this tool, run for 2 days, all fine.