Decode and union

Is it possible to use a decode function in the order by clause, when you have to select statements with a union?

Hi, Tove
Have you tried using a lexical parameter for your 'order by' clause? In the after_parameter_form trigger you could then use an 'if/else' statement to achieve the same result as a decode. This works in a simple query but I have not tried it in a union.
Regards,
Valerie

Similar Messages

  • Efficiency of decoding and displaying image files?

    BRIEF SUMMARY
    My question is this: can Flash Player download JPG and GIF
    files from a server and rapidly open/decode them, ready for
    display, efficiently and
    entirely 'in memory'?
    Would Flex be a good choice of language for developing a RIA
    that needs to continually download lots of JPG and GIF images
    on-the-fly from the server and render them on the screen? I *don't*
    want my application to thrash the hard disc.
    BACKGROUND
    I am designing a 'rich' web app, and I'm investigating
    whether Flex is the right tool for the job.
    Although Flash's animation features are an obvious selling
    point for implementing my user interface, I also need to do some
    server-side rendering. What I want to do is perhaps a little
    unorthodox: I will be generating lots of GIF and JPG files on the
    fly and these will be streamed to the client (along with other
    application data, e.g. in XML format) to update different parts of
    the on-screen document. In need this to happen very quickly (in
    some cases, creating the effect of animation).
    It happens that JPGs and 16-colour GIFs will be, by far, the
    most efficient formats for streaming the images, because of the
    nature of the application. I could of course send the images in
    some proprietary format, geared for my application, but presumably
    decoding the images would be slow as I would have to implement this
    myself in ActionScript, and so I would be limited by the speed of
    Flex 'bytecode'. (I realise Flash is a lot more optimised than it
    once was, but I am hoping to see a gain from using image formats
    that Flash natively understands!)
    Naturally the internet bandwidth should (in principle) be the
    bottleneck. However, assuming I can get my image files to the
    client on time, want I want to know is:
    how efficient is Flash at loading such files?
    Bearing in mind that I'm not just displaying the occasional
    image -- I will be doing this continuously. Most of the images
    won't be huge, but there will be several separate images per
    second.
    The image files will be a mixture of normal colour JPGs and
    4-bit colour GIFs (LZW-compressed). I know that Flash natively
    supports these formats, but depending on how Adobe have implemented
    their LZW/Huffman decoding and so on, and how much overhead there
    is in opening/processing downloaded image files before they are
    ready to 'blit' to the screen, I imagine this could be pretty fast
    or pretty slow!
    If my client only has a modest PC, I don't want the JPG/GIF
    decoding alone to be thrashing his CPU (or indeed the disc) before
    I've even got started on 'Flashy' vector stuff.
    I'm new to Flash, so are there any 'gotchas' I need to know
    about?
    E.g. Would it be fair to assume Flash Player will do the
    decoding of the downloaded image entirely 'in memory' without
    trying to do anything clever like caching the file to disc, or
    calling any libraries which might slow down the whole process? It
    would be no good at all if the images were first written to the
    client's hard disc before being ready to display, for example.
    Further, if I'm doing something a little out-of-the-ordinary,
    and there is no 'guarantee' that images will be loaded quickly,
    what I'm doing might be a bad idea if a later version of Flash
    Player may (for example) suddenly start doing some disc access in
    the process of opening a newly downloaded image. So, while I could
    just 'try it and see', what I really need is some assurance that
    what I'm doing is sensible and is likely to carry on working in
    future.
    Finally, I imagine JPG/GIF decoding could be something that
    would vary from platform to platform (e.g. for the sake of
    argument, Flash Player for Windows could use a highly-optimised
    library, but other versions could be very inefficient).
    This could be the 'make or break' of my application, so all
    advice is welcome! :) Thanks in advance.

    You need a servlet/jsf component to render the image in the response.
    Look at this: http://www.irian.at/myfaces-sandbox/graphicImageDynamic.jsf

  • How to decoding and encoding PNG and GIF images?

    I could decode and encode JPEG images using following create functions which are in com.sun.image.codec.jpeg package.
    JPEGImageDecoder decoder = JPEGCodec          .createJPEGDecoder(inputStream);
    JPEGImageEncoder encoder = JPEGCodec                    .createJPEGEncoder(outputStream);
    But I dont know required package and functions to decode and encode PNG and GIF images. Please help me.

    Is the API that hard to follow?
    ImageIO.read( file/stream/url)
    ImageIO.write( image, format (e.g. PNG, GIF(1), JPEG), file/stream what have you)
    1) Not sure if Java supports GIF saving, it might if you install JAI, or Java 6.

  • How to decode and display jpeg from a bytes stream ?

    Hello.
    I am new to Flex and got stuck on something that I assume has an easy solution.
    I have an RIA application in which I want to display a jpeg image. this image was
    sent on a Web Service message,  as an array of bytes (I just read the jpeg file as
    is and send it to the web application).
    I couldn't figure out a way to decode and display this image at the RIA, using an apropriate component. (Image ?)
    I have seen a few examples where a jpg is loaded from a web server using a url in
    which it's avaliable, but I don't think this is much help to me...
    Your help/example apreciated.

    Thanks.
    I assume you mean passing the bytesArray to Image.load() ?
    Anyway, that's what I did and it worked fine.
    Now I am facing the same issue with playing sounds, which are available on bytesArray.
    I tried to pass the mp3 bytes to the Sound.load(), but it doesn't work, becuase it tries
    to cast it to a URL. do you know by any chance  whether I can achieve that somehow ?
    (I could use prety much any other sound format, if it makes a difference)
    Thanks again.

  • Error in Adobe Captivate 4: "unable to decode and import the selected wav - mp3 file"

    Good day!
    I have a problem. When i want to import music file from standart Gallery, i see the mistake: unable to decode and import the selected wav - mp3 file.
    I can't import mp3,wav files...
    In Adobe Help site i have found this: http://help.adobe.com/en_US/Captivate/4.0/Using/WS5b3ccc516d4fbf351e63e3d119e9582190-7fd8. html
    But in my Adobe Captivate 4 directory i don't have file regsvr32 NSAudio.dll.
    Question: where i can download this file?
    Thanks!

    Hi there
    As I recall there were two different "fixes" for audio with Captivate 4. One involved replacing the dll and another had something to do with installation problems on Windows XP. So give the link below a try.
    Click here to view
    Cheers... Rick
    Helpful and Handy Links
    Begin learning Captivate 5 moments from now! $29.95
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcererStone Blog
    Captivate eBooks

  • Joins and Unions  defference

    Hi Mates.
    Could any one tell me the Basic difference between Joins and Unions . I know InfoSet contain  joins and Multiproviders contains the unions.
    Regards.
    harry

    Hi Harry,
       Let suppose you had two table TAB1 = 10 records and TAB2 = 30.
       If you are using the left join based on TAB1 for TAB2 then you will get only 10 only.
       If you are using the inner join between tab1 and tab2 then you will get only the combination of records only...(less records)
      if you are using the union between the two tables then you will get totaly 40 records.
    Regards,
    PRK
    Message was edited by: PRK

  • Diff between decode and case

    Hi
    I need small clarification about difference between decode and case
    Thanks who visit my thread

    And for those people who can't be ar$ed to follow links...
    Decode allows for conditional output where the conditions are straightforward matches between values.
    Case allows for regular conditions to be used such as greater than, less than etc.
    Some of the things done by case can be achieved through decode as well but in a more convoluted manner than simply using case.
    ;)

  • More effecient way of using Decode and CASE

    Is it possible to use both case and decode together? I feel I have too many decode and I am not sure how to write this in a more efficient way.
    I would really appreciate any help.
    Thank you so much in advance!!!
    SELECT  Person_ID,Work_ID,
        CASE WHEN NBR = 1 THEN
                MIN(DECODE(NBR, 1, field1)) aug_one_field1;
                MIN(DECODE(NBR, 1, field2)) aug_one_field2;
                MIN(DECODE(NBR, 1, field3)) aug_one_field3;
                MIN(DECODE(NBR, 1, field4)) aug_one_field4;
                MIN(DECODE(NBR, 1, field5)) aug_one_field5;
                MIN(DECODE(NBR, 1, field6)) aug_one_field6;
        CASE WHEN NBR = 2 THEN
                MIN(DECODE(NBR, 2, field1)) aug_two_field1;
                MIN(DECODE(NBR, 2, field2)) aug_two_field2;
                MIN(DECODE(NBR, 2, field3)) aug_two_field3;
                MIN(DECODE(NBR, 2, field4)) aug_two_field4;
                MIN(DECODE(NBR, 2, field5)) aug_two_field5;
                MIN(DECODE(NBR, 2, field6)) aug_two_field6;
        CASE WHEN NBR = 3 THEN
                MIN(DECODE(NBR, 3, field1)) aug_three_field1;
                MIN(DECODE(NBR, 3, field2)) aug_three_field2;
                MIN(DECODE(NBR, 3, field3)) aug_three_field3;
                MIN(DECODE(NBR, 3, field4)) aug_three_field4;
                MIN(DECODE(NBR, 3, field5)) aug_three_field5;
                MIN(DECODE(NBR, 3, field6)) aug_three_field6;
        CASE WHEN NBR = 4 THEN
                MIN(DECODE(NBR, 4, field1)) aug_four_field1;
                MIN(DECODE(NBR, 4, field2)) aug_four_field2;
                MIN(DECODE(NBR, 4, field3)) aug_four_field3;
                MIN(DECODE(NBR, 4, field4)) aug_four_field4;
                MIN(DECODE(NBR, 4, field5)) aug_four_field5;
                MIN(DECODE(NBR, 4, field6)) aug_four_field6;
    END
       FROM (SELECT Person_ID,Work_ID, NBR
                   fiel1, field2, field3,field4,field5, field6,
                  FROM field_rep
       GROUP BY Person_ID,Work_ID

    Thanks alot John and Frank.
    John to answer your question, I just felt the 24 or more decode will slow down the systems performance, hence I was trying to find a better way to do it.
    Frank
    This is a sample data but I want it pivoted hence the reason for using the decode. I have oracle 10g. These are sample data
    Person_id work_id NBR      field1     field2     field3     field4 field5 field6
    1       ao334   1     1/2/2009   1/9/2010     block_A        HH       55667      1
    1       ao334   2     5/2/2011   9/9/2013     block_Z        HL       11111      3
    1       ao334   2     1/2/2009   1/9/2010     block_A        HH       22222      1
    1       ao334   4     1/2/2009   1/9/2010     block_A        HH       zzzzz      7
    1       z5521   1     10/5/2006  12/31/2012     block_C        SS       33322      1
    1       z5521   2     1/2/2009   1/9/2010     block_C        SS       21550      1
    1       z5521   3     1/2/2009   1/9/2010     block_R        SS       10000      1
    1       z5521   4     1/2/2009   1/9/2010     block_D        SS       99100      5
    1       z5521   5     1/2/2009   1/9/2010     block_P        SS       88860      1
    1       z5521   6     1/2/2009   1/9/2010     block_G        SS       99660      8
    1       ob114   1     1/2/2009   1/9/2010     block_A        HH       52333      1
    1       ob114   2     1/2/2009   1/9/2010     block_A        HH       88888      1Output will look like this
    Person_id work_id  aug_one_field1 aug_one_field2 aug_one_field3 aug_one_field4 aug_one_field5 aug_one_field6 aug_two_field1 aug_two_field2 aug_two_field3 aug_two_field4 aug_two_field5  aug_two_field6
    1       ao334        1/2/2009       1/9/2010       block_A       HH             55667          1              5/2/2011       9/9/2013       block_Z        HL                      11111          3

  • Decode and Case

    Hi,
    What is the difference between decode and case?
    What are the cases in which we can use Decode and case
    Thanx

    you can not put Search CASE statements by using DECODE
    Eg:
    SELECT AVG(CASE WHEN e.salary > 2000 THEN e.salary ELSE 2000 END) "Average Salary" FROM employees e;Can't we?
    select avg(decode(sign(e.salary - 2000), 1, e.salary, 2000)) "Average Salary" from employees e;

  • Can not import my wav. file, message "unable to decode and import selected wav/mp3 file"

    Please help, i don't know how to import my wav file. I checked to see if the settings are compatible
    and it seems like them are. The wav file im trying to import is: 88kbps, 11kHz...

    I don't think so, if its not how do I get it to be?
    (Embedded image moved to file: pic07711.jpg)
    Jackie Stjepanovic
    Trainer
    Staff Development
    Automobile Customer Service (ACS)
    (310) 781-4627
                                                                                    Captiv8r                                                 
                 <[email protected]                                        
                 >                                                          To
                                           Jackie Stjepanovic             
                 11/23/2010 08:56          <[email protected]>
                 AM                                                         cc
                                                                                    Subject
                 Please respond to         Can not import my
                 clearspace-974018         wav. file, message "unable to  
                 851-110472-2-3295         decode and import selected wav/mp3
                 [email protected]         file"                          
                     dobe.com                                                                               
    Is it PCM encoded?
    Cheers... Rick  
    http://www.robowizard.com/pc.gif
    Helpful and Handy Links
    http://www.gooberguides.com/ProductPages/Captivate/Captivate5Foundations.htm
    http://www.Adobe.com/cfusion/mmform/index.cfm?name=wishform&product=5
    http://www.ShowMeSolutions.biz
    http://sorcererstone.wordpress.com/
    http://www.gooberguides.com

  • Unable to decode and import wav/mp3 file

    I've recorded an audio file using Mbox 2 and Pro Tools LE 7.
    I have exported the file to the wav format, but when I try to
    import it into my Captivate 2 file, I get the following error
    message.
    "Unable to decode and import the selected wav/mp3 file."
    Any ideas why this is happening?
    Thanks for the help.
    Mark

    Hi "Chemistry guy",
    A WAV is not a WAV is not a WAV. There are many "types" of
    WAV audio file. Check to be sure that your WAV file is in "
    PCM" format. That should be easy with a good audio editor.
    Matter of fact, it should be easy even with Windows included "Sound
    Recorder" application.
    To use your own audio editor, I imagine you know how to find
    and change file properties.
    On the other hand, if you want to use "Sound Recorder" ... on
    WinXP go to "Start > All Programs > Accessories >
    Entertainment > Sound Recorder", then open the file, then go to
    "File > Save As" ... and
    at the bottom of the save-as dialog, you will see "Format"
    (describing current file formatting) and a button to "CHANGE" that
    format. Click the button and you will see a drop-list containing
    various formats.
    Select "PCM" and
    save the file.
    Hopefully with this change made, you will be good to go.
    .

  • Unable to decode and import the select wav/mp3 file

    Hi,
    I've been TRYING to test the Text-to-speech feature in
    Captivate 4. Problem: "Unable to decode and import the select
    wav/mp3 file" each and every time I want to use it. Frustrating!
    I also tried importing sounds from the library, same problem.
    My system is Vista Business 64Bit, 4Gb RAM, Intel SSD hard
    drive, conexant high definition audio 221 on a Lenovo T400.
    How do I fit this? I want to try it out damnt :)

    I went through the "unable to decode and import the selected wav/mp3 file" error.  After talking with an Adobe Rep,  I quickly realized that I could NOT use the directions.  I have no experience in using Command Prompts.  I have written down the directions by key stroke for those people that are similar to me.  Enjoy!
    For Vista and Win7,
    Click on the circle start menu,
    In the search box, type in command and in the generated list, "right-click" on the comman link and change to "run as administrator".
    Go back to the search box, type in command and hit enter.  This will take you to the command prompt window (black window w/ white text) lol
    You have to get to the right directory first.
    Type: cd (space-bar) .. (hit enter)
    Type: cd (space-bar) .. (hit enter)
    If Captivate is installed on Program Files (x86) ---
    Type: cd (space-bar) progra~2 (hit enter)
    If Captivate is installed on Program Files
    Type: cd (space-bar) progra~1 (hit enter)
    Type: cd (space-bar) Adobe (hit enter)
    Type: cd (space-bar) Adobe (space-bar) Captivate (space-bar) 4 (hit enter)
    Type: regsvr32 (space-bar) NSAudio.dll (hit enter)
    If you get an error at any point, re-key that particular line.
    Once you see that the last line of command went through, open up Captivate and test the Text to Speech.  These instructions fixed both computers I was working on!!!!

  • CP4 unable to decode and import the selected wav/mp3 file

    I am trying to import a .wav file into a project and get an error message 'unable to decode and import the selected wav/mp3 file'.
    I have tried the solution huan_miguel posted a week ago for someone with the same problem.
    http://blogs.adobe.com/captivate/2009/03/adobe_captivate_4_installatio n.html
    executed all the steps described in this link.
    Unfortunately, the problem is still there.
    Any other solution?

    You're probably going to need to do both.
    Although Captivate can certainly accept a 10 meg audio file, you would need to add it to the movie and then synchronise the slides to the audio. Chopping the audio file up and adding the relevant bits to each slide has both advantages and disadvantages.  It's easier to control the playback synchronisation when you divide up the audio, but it's more work.
    Take a look at this graphic from SoundBooth when I export an audio file recorded in Captivate 5:
    Notice that it shows the bitrate of the Captivate WAV file as being 16 bit.  This is quite a low bitrate.  You can go as high as 32 bit in SoundBooth, however, in my experience, when you try to import a WAV into Captivate that is over 16 bit you will encounter issues.  Cp just doesn't seem to like it.
    If you want to learn more about bit rates in multimedia: http://en.wikipedia.org/wiki/Bit_rate
    Suffice to say, you need to find out what the current bit rate of the audio file is, and if necessary, save it as 16 bit for Captivate.  For this, you will require some kind of audio editing software.
    You can try using Audacity as someone else suggested: http://audacity.sourceforge.net/  and try exporting the file out as 16 bit.
    However, if you are going to be doing quite a bit of this type of work, I would suggest you invest in Adobe Soundbooth, or something of that ilk.  You'll enjoy the experience more.

  • Unable to decode and import the selected wav/mp3 file

    I am trying to import mp3's into a Captivate 3 presentation
    but keep getting this error "Unable to decode and import the
    selected wav/mp3 file." I am using the same mp3 files that I have
    used many times with projects in Cap1 and Cap2. I have converted
    the files to wav's and tried but I'm still getting the same
    message. I have a deadline and I'm stumped.
    Any ideas?

    Hi DianaUNC
    Interesting. I've seen it happen with WAV files but not MP3.
    Do you still have Captivate 2 around? If so, do these successfully
    import into Captivate 2? One thought was that you might pop them
    into something like Audacity and save them out again. Perhaps
    something is amiss with the encoding used.
    Or you might try the trick of opening them in Windows Sound
    Recorder and saving them out of that in a different format. I know
    that works with one particular WAV file I have.
    Cheers... Rick

  • Alter express code to include views and unions for top dim items

    If a user selects a dimension item at the top most level, the explain plan shows that it does a full table scan of the fact table instead of using the materialized views. If we add the highlighted information(see below) to the osa generated sql, then the explain plan does what we want it to do.
    Do you know if it is possible to alter the express code to include the views and unions for the dimension items that are at the top most level in the hierarchy? I think that I need to alter how the sq.query.drv program figures out what to include in the sql. But this is beyond my express comfort level.
    The query below is generated by the osa cube and we want to include the highlighted information in the sql that is generated which will force it to use the correct query rewrite and return data in a reasonable time frame.
    Is this possible and has anyone tried this before?
    SELECT 'B4' || lt2.acct_lvl_4_id
    , 'C2' || lt6.cust_grpng_id
    , 'G1000'
    , 'L1000'
    , 'O190012880'
    , 'P1000000000'
    , 'R100001'
    , 'T3' || lt25.mth_id
    , 'E190'
    , SUM (ft34.usd_curr_pl_amt)
    FROM osa_fivcas_mth_ifct_gbl_992 ft34
    , osa_fivcas_acct_992 lt2
    , osa_fivcas_cal_mastr lt25
    , osa_fivcas_cust_898_000 lt6
    -- Extra Tables
    , osa_fivcas_geo_942 lt20
    , osa_fivcas_org_817 lt22
    , osa_fivcas_prod_710 lt23
    WHERE lt2.acct_lvl_9_skid = ft34.acct_lvl_9_skid
    AND lt6.cust_lvl_10_skid = ft34.cust_lvl_10_skid
    AND lt25.mth_skid = ft34.mth_skid
    -- Extra Join Conditions
    AND lt20.geo_lvl_8_skid = ft34.geo_lvl_8_skid
    AND lt22.org_lvl_12_skid = ft34.org_lvl_12_skid
    AND lt23.fpc_skid = ft34.fpc_skid
    AND lt2.acct_lvl_4_id IN ('81013286')
    AND lt6.cust_grpng_id IS NOT NULL
    AND lt25.mth_id IN ('AUG08')
    GROUP BY 'B4' || lt2.acct_lvl_4_id
    , 'C2' || lt6.cust_grpng_id
    , 'G1000'
    , 'L1000'
    , 'O190012880'
    , 'P1000000000'
    , 'R100001'
    , 'T3' || lt25.mth_id
    , 'E190';

    David,
    When u add a field to a header table. U can use the User data source to bind it. Even if u add the DBDatasource the Coulmn needs to be present in the DB at the time of setting the data source to the Field in the UI.
    Actually if u add a header filed to the DB it pops up on the User-Fields Form i guess u can use it as no extra code is needed. To view the UDF form VIEW--User Defined Fields.
    Hope it helps,
    Vasu Natari.

Maybe you are looking for