JSON.decode not working

Hi All,
I have some JSON code that is generated from my server. I am
trying to decode the JSON using the as3corelib. I am receiving the
error Unexpected character v encountered. It's from the viewentry
line at the beginning of the attached JSON code.
Any thoughts on why this is?
I can't change the JSON being generated so I'm going to have
to handle it in the JSON decoder . . .

You property name -- xaxis in this case -- must be a quoted
string:
private function decode() : void {
var s:String = '{
"xaxis":["test1","test2","test3","test4","test5"]}';
var o:Object = JSON.decode(s);
var a:Array = o['xaxis'] as Array;
Alert.show(a.length.toString());

Similar Messages

  • Decode Not working in sql loader

    I had a requirement of loading flatfile into staging table using SQL Loader, One of the columns in the the Flat file is having values FALSE or TRUE and my requirement is that I load 0 for FALSE and 1 for TRUE which can be achieved by simple DECODE function...I did use decode and tried to load several times but did not work. What might be the problem
    LOAD DATA
    INFILE 'sql_4ODS.txt'
    BADFILE 'SQL_4ODS.badtxt'
    APPEND
    INTO TABLE members
    FIELDS TERMINATED BY "|"
    ( Person_ID,
    FNAME,
    LNAME,
    Contact,
    status "decode(:status, 'TRUE', '1','FALSE','0')"
    I did try putting a trim as well as SUBSTR but did not work....the cloumn just doent get any values in the output (just null or say free space)
    Any help would be great.....

    Hello user8937215.
    Please provide a create table statement and a sample of data file contents. I would expect DECODE or CASE to work based on the information provided.
    Cheers,
    Luke
    Please mark the answer as helpful or answered if it is so. If not, provide additional details.
    Always try to provide create table and insert table statements to help the forum members help you better.

  • DECODE not working!!!

    Hello,
    Why DECODE doesnt work in a computed unbound item,
    my use is :
    SUM (DECODE(item,'value',-(item1),item1))
    the 3 items are in the same block,
    I tried with :
    SUM (DECODE(:block.item,'value',-(:block.item1),:block.item1))
    How can I do this, I need the unbound item to be calculated automatically ,,,
    HELP!!!!!!!!!

    Hello Cal,
    My problem is the following :
    I have an unbond item in a bloc 1, inside I have to make a Sum, this sum must take consideration of a status and an amount witch are in another bloc2.
    First, I have tried with a computed item :
    sum decode.......), with no result!!!
    Then, I used, a client side function ( a query on columns in tables), the result is correct only when I query the form the first time,
    But, IF I change one of the items ( status or amount),
    save the changes, the unbound is not refreshed although I recalcul it in the when- validate-item of the two items ( staus and amount), the error is something like: cannot update a calculated item...
    any help ?

  • Decode not working on ViewObject

    In the expert mode of the view object I have a Decode Statement as
    DECODE(SUBSTR(ViewParameterPaEO.REC_STATUS,1,1),'I','INVALID')
    Column REC_STATUS is varchar2(3). The value in the Data base is "I1"
    If I access the data using DataTableComponent it returns "INV",
    Now if I use <jbo:showvalue> tag it returns "I1" (This is the value in the Database).
    Why is this happening.
    Thanks

    SELECT ViewParameterPaEO.PARM_ID,
    ViewParameterPaEO.CODE_ID,
    ViewParameterPaEO.AREA,
    ViewParameterPaEO.PARAMETER_NAME,
    ViewParameterPaEO.VALUE,
    ViewParameterPaEO.PARM_BEGIN_DATE,
    ViewParameterPaEO.PARM_END_DATE,
    ViewParameterPaEO.MODIFIER_CODE,
    ViewParameterPaEO.PROVIDER_TYPE,
    ViewParameterPaEO.PROVIDER_ID,
    ViewParameterPaEO.PROVIDER_GROUP,
    ViewParameterPaEO.PLACE_OF_SERVICE_CODE,
    ViewParameterPaEO.SPECIALTY_CODE_GRP,
    ViewParameterPaEO.PROGRAM_TYPE,
    ViewParameterPaEO.TYPE_OF_PROCEDURE,
    DECODE(SUBSTR(ViewParameterPaEO.REC_STATUS,1,1),'I','INVALID')
    FROM VIEW_PARAMETER_PA ViewParameterPaEO
    FYI- I tried to give a alias name as DECODE(SUBSTR(ViewParameterPaEO.REC_STATUS,1,1),'I','INVALID') REC_STATUS it still did not work.
    Thanks

  • SB0460 AC3/DTS decoder not working on Windows 7 (Driver 2.18.0015)

    Hello everybody!
    I hope somebody will be able to help me with my strange problem:
    I just did the move from Windows XP (x64) to Windows 7 (x64) and discovered that the X-FI's AC3/DTS decoder is not working. All I get is either noise/static/crackling (AC3) or no sound at all (DTS). I have an X-FI XtremeMusic card (Serial: MSB0460535000206P) and the decoder is working absolutely fine on Win XP.
    The latest driver version 2.8.005 is installed. I have also tried the first driver (2.8.003) that was supposed to have fixed the decoder under Windows 7. The changelog there says: Dolby? Digital and DTS? decode re-established for sound cards that included decoding in their Windows XP drivers. No such luck for me.
    My sound card is definitely supported so I'm wondering why it's not working.
    Use Built-in Decoder is selected in the Audio Control Panel I'm passing audio to S/PDIF (from e.g. PowerDVD or MPC-HC). On Win XP usually the on screen display pops up when the decoder detects the signal, nothing on Win 7.
    (Note that I am NOT trying to input a signal from an external source.)
    Gi'ven everything I have tried, logic tells me that there may still be a bug lurking in the decode driver.
    Any ideas?

    FI think you have to pay now for the decoder when using digital output but not sure what soundcards are limited.... otherwise try this drivers and see this help but i dont know if they will work...
    http: //forums.creative.com/t5/Sound-Blaster/PAX-PCI-XFI-ALL-OS-Driver-V4-5/td-p/574643

  • Json.encode not working in Flash CS6?

    Hey all,
    I just updated to CS6 last week and tried to run one of my applications that worked fine in 5.5.
    I'm now getting an error when I try to compile it. The error is 'Call to a possibly undefined method encode through a reference with static type Class'.
    The error coming from this line:
    var myJson:String = JSON.encode(myData);
    Importing the package com.adobe.serialization.json.JSON, so everything should be fine?
    Is there a new way to encode/decode JSON data in CS6? Is there a fix around, or am I just missing something completely?
    Cheers.

    if you're publishing for fp 11 or better you will use the native flash JSON class.  in that case, you should use the static parse() and stringify() methods.
    if you're publishing for less than fp11, you can use mike chambers JSON class (https://github.com/mikechambers/as3corelib) that has static encode() and decode() methods.

  • Latest groovy library (Json slurper) not working in ODI 11.1.1.5.0

    Hello,
    My procedure in ODI is failing as I guess I'm trying to use a groovy library (Json Sluper) which is not available in ODI 11.1.1.5.0 . The error I'm getting is 'unable to resolve class groovy.json.JsonSluper'. Has anyone faced this issue and knows how can I resolve it?
    Thanks in advance.

    Can you try updating the groovy lib in odi with your latest one. You may find relevant information in support note [Doc ID 744351.1]
    Thanks

  • Basic query using DECODE not working as expected.

    Version:11.2.0.3
    Platform: RHEL 5.8
    I am trying to use DECODE function.
    In the below example, If the search encounters the string "Enterprise" , then the decode should
    return 'Enterprise' . But it doesn't seem to work.
    I thought some hidden character was causing the issue, so, I used TRIM. But no luck.
    SQL> create table t (banner varchar2(80));
    Table created.
    SQL> insert into t values ('Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from t;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    SQL> select * from t where banner like '%Database%';
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    -- Trying to use decode. If the search encounters the string "Enterprise" , then return 'Enterprise'
    -- Although the string "Enterprise" is present ,  decode doesn't seem to work.
    -- I tried using trim , upper . But no luck.
    SQL> select 'EDITION', decode(banner,'%Enterprise%','Enterprise','Standard') Edition from t where banner like '%Database%';
    'EDITIO EDITION
    EDITION Standard
    SQL> select 'EDITION', decode(trim(banner), '%Enterprise%','Enterprise','Standard') Edition from t where trim(banner) like '%Database%';
    'EDITIO EDITION
    EDITION Standard
    SQL> select 'EDITION', decode(upper(trim(banner)), '%ENTERPRISE%','Enterprise','Standard') Edition from t where upper(trim(banner)) like '%DATABASE%';
    'EDITIO EDITION
    EDITION Standard
    SQL>
    Just don't understand why decode can't see the string "Enterprise"
    BTW . Where is the preview button ?

    It (a portion string matching) ain't work in DECODE, for this CASE has a advantage of using over it.
    Like
    with t
    as
    (select 'Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production' banner from dual)
    select 'EDITION',
    case when banner like '%Enterprise%' then 'Enterprise' else 'Standard' end edition
    from t
    'EDITIO EDITION
    EDITION Enterprise

  • 2D barcode decoding not working with Reader Extensions trial certificate

    Dear All
    After I import the last reader extensions trial certificate for ES4, but why 2D barcode decoding checkbox is disable in the service web page?
    thanks

    A new certificate with 2D barcode capabilities has been uploaded to the LiveCycle devnet site http://www.adobe.com/devnet/livecycle.html, the direct link is http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/livecycle/solutions/R eaderExtensionCert%20p16.zip

  • JSON decoder decode is not working

    I'm using flash builder 4.
    The code below doesn't work nor it gives any form of errors.
    import com.adobe.serializers.json.JSONDecoder;
    var s:String="{hours:16, minutes:9, seconds:2}";
    var obj:Object=j.decode(s);
    Alert.show(obj.hours.toString());

    I am using Flash CS5 and I have the same problems.
    private function fetchUserInfo(data: Object): void {
        try{
               var arr:Array = JSON.decode(String(data));
          catch(e:Error){
                atext.appendText("error occured");
    Error is always being caught.

  • [AIR 3.0] New JSON functionality doesn't work in FlashPro: Error #1065: Variable JSON is not defined

    After upgrading the AIR SDK to 3.0 in Flash Professional CS5.5 I've found some problems.
    First, the JSON class in the as3corelib.swc library now throws a couple of compile errors:
    1061: Call to a possibly undefined method decode through a reference with static type Class.
    1172: Definition com.adobe.serialization.json:JSON could not be found.
    At first I was completely puzzled, since I had the proper "import com.adobe.serialization.json.JSON;" reference,
    and I had the "as3corelib.swc" referenced in my ActionScript Properties, so how could that not be found?
    Then, I found out that's because it conflicts with the new internal JSON class included with AIR 3.0
    (maybe it should have been called something else, to avoid conflicts with Adobe's own as3corelib library).
    The new native JSON class doesn't have the decode() method. Now it's called parse()
    Ok, so I've tried using the new JSON class, but after changing decode() with parse() and removing
    the "import com.adobe.serialization.json.JSON;" reference, Flash tells me that "Variable JSON is not defined".
    Really? The JSON class is showing in the Flash Builder code completion popup,
    complete with its all-new parse() and stringify() methods! So why does it say it's not defined?
    Also, my SWF file gets compiled with no errors at all, so that verifies that the new 3.0 libraries are in place.
    I only get the "JSON is not defined" error at runtime in ADL, not at compile time. Why?
    In order to upgrade to the AIR 3.0 SDK, I've followed this guide:
    http://kb2.adobe.com/cps/908/cpsid_90810.html
    I know that's about upgrading to AIR 2.7, but I suppose the steps to upgrade to AIR 3.0 would be very similar,
    only with the AIR3.0 SDK package, instead of 2.7.
    I also took care to type version="13" in all the XMLs, instead of version="12" as stated in that guide, which is meant for 2.7.
    Also, I followed this advice about adding -swf-version=13 in the Project Properties window in Flash Builder:
    http://blogs.adobe.com/cantrell/archives/2011/08/how-to-use-the-air-3-beta-sdk.html
    But that doesn't seem to make a difference, since, even though I use Flash Builder for code editing (which is usually used for Flex),
    my project is a Flash Professional project, not a Flex one, and when testing the project, Flash Builder runs Flash Professional
    to compile and then runs adl.exe (it's the same as if you click the option "Control / Test movie / in AIR Debug Launcher (Mobile)" inside Flash Pro).
    In the "ActionScript Settings" window in Flash Professional, I also have the proper airglobal.swc referenced (from the AIR 3.0 SDK),
    and the same airglobal.swc is referenced in Flash Builder as well (in "Referenced Libraries"), to get proper code completion.
    I've tried all sorts of things to try to get it to work, but no luck. Still get the "JSON is not defined" error at runtime.
    I'm starting to get desperate about this. I'm going to have to revert back to AIR 2.7.1, to stop wasting time on this issue.
    BTW, I'm also having another unrelated problem (though maybe it happens because of the same reason as the other problem).
    Now Flash Builder underlines the getTime() method in my code, as if it no longer were a method of a Date class instance.
    I have a line where I ask for the timestamp like this:
    ts = new Date().getTime();
    That has worked perfectly fine up until now with AIR 3.0.
    Now, when hovering the mouse cursor over the orange "(?)" icon that appears at the left, Flash Builder tells me
    "Access of undefined property getTime". Why?
    The AS3 documentation doesn't say anything about getTime() getting deprecated of anything of the sort:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Date.html
    In fact, in the code completion popup that Flash Builder shows, now there isn't any mention
    of get or set methods, as you can see here:
    I suppose I can use the .time property instead of .getTime() but I don't know why I'm not getting all the methods I had available before.
    Any ideas why all this is happenning? Specially the dreaded "JSON is not defined" error.

    Well, after much tinkering, I think I've finally found a way to finally make it work!.
    I've created some modified XML files with the profiles needed for AIR 3.0 and after a lot of tries, it finally works!
    I've uploaded them here: http://www.mediafire.com/?d5e761frl5px4
    These are the steps needed to get AIR 3.0 running properly:
    Put all three files into the folder "c:\Program Files (x86)\Adobe\Adobe Flash CS5.5\Common\Configuration\Players"
    Then, make sure you've unzipped the AIR 3.0 SDK into the folder "c:\Program Files (x86)\Adobe\Adobe Flash CS5.5\AIR3.0" Do not overwrite the contents of the "AIR2.6" folder, as suggested by the "Overlay AIR SDK" article (linked in the above post). It gave me problems. It's best to use a different separate folder. My XML files point to that new "AIR3.0" folder.
    Inside the folder "c:\Program Files (x86)\Adobe\Adobe Flash CS5.5\Common\Configuration\ActionScript 3.0" create a new folder named "AIR3.0". Inside that folder, copy the file "airglobal.swc" located at "c:\Program Files (x86)\Adobe\Adobe Flash CS5.5\AIR3.0\frameworks\libs\air".
    Finally, you will have to keep the file "descriptor-sample.xml" in the "c:\Program Files (x86)\Adobe\Adobe Flash CS5.5\AIR2.6\samples" folder, but change the xmlns attribute to "http://ns.adobe.com/air/application/3.0"
    Yes, you have to change that inside the AIR2.6 folder even if the SDK has been put into AIR3.0. That's because of how the publish settings work in Adobe Flash. It's hardcoded into a DLL, so that can't be changed. Not very intuitive.
    I think AIR SDK installations should be a lot more straightforward than this! I know Adobe AIR is meant for developers, not for final users, but still, all these not very well documented upgrade procedures are a pain in the ***. I've wasted A LOT of hours in this (more than half a day), with what should have been a straightforward upgrade!
    Adobe should make a SDK installer so we do not have to be tinkering with all these error-prone procedures each time a new update is released!
    Well, I hope those XML files are useful to somebody and avoids further frustration.
    Regards,
    OMA2k
    PD: BTW, I still have the .getTime() issue described in my above post, but it's not very important,
    since I can still use the .time property. Still, it puzzles me why this is happening.

  • Case statement and Decode function both are not working in Select cursor.

    I have tried both the Case statement and Decode function in Select cursor, but both the things are not working. On the other hand both the things work in just select statement.
    See the first column in select (PAR_FLAG), I need to have this evaluated along with other fields. Can you please suggest some thing to make this work. And also I would like to
    know the reason why decode is not working, I heard some where Case statement do not work with 8i.
    Author : Amit Juneja
    Date : 06/20/2011
    Description:
    Updates the Diamond MEMBER_MASTER table with the values from
    INC.MEM_NJ_HN_MEMBER_XREF table.
    declare
    rec_cnt number(12) := 0;
    commit_cnt number(4) := 0;
    cursor select_cur is
    Select DECODE(1,
    (Select 1
    from hsd_prov_contract R
    where R.seq_prov_id = PM.seq_prov_id
    and R.line_of_business = H.line_of_business
    and R.PCP_FLAG = 'Y'
    and R.participation_flag = 'P'
    and SYSDATE between R.EFFECTIVE_DATE AND
    NVL(R.TERM_DATE,
    TO_DATE('31-DEC-9999', 'DD-MON-YYYY'))),
    'Y',
    'N') PAR_FLAG,
    H.SEQ_ELIG_HIST,
    H.SEQ_MEMB_ID,
    H.SEQ_SUBS_ID,
    H.SUBSCRIBER_ID,
    H.PERSON_NUMBER,
    H.EFFECTIVE_DATE,
    H.TERM_DATE,
    H.TERM_REASON,
    H.RELATIONSHIP_CODE,
    H.SEQ_GROUP_ID,
    H.PLAN_CODE,
    H.LINE_OF_BUSINESS,
    H.RIDER_CODE_1,
    H.RIDER_CODE_2,
    H.RIDER_CODE_3,
    H.RIDER_CODE_4,
    H.RIDER_CODE_5,
    H.RIDER_CODE_6,
    H.RIDER_CODE_7,
    H.RIDER_CODE_8,
    H.MEDICARE_STATUS_FLG,
    H.OTHER_STATUS_FLAG,
    H.HIRE_DATE,
    H.ELIG_STATUS,
    H.PREM_OVERRIDE_STEP,
    H.PREM_OVERRIDE_AMT,
    H.PREM_OVERRIDE_CODE,
    H.SEQ_PROV_ID,
    H.IPA_ID,
    H.PANEL_ID,
    H.SEQ_PROV_2_ID,
    H.SECURITY_CODE,
    H.INSERT_DATETIME,
    H.INSERT_USER,
    H.INSERT_PROCESS,
    H.UPDATE_DATETIME,
    H.UPDATE_USER,
    H.UPDATE_PROCESS,
    H.USER_DEFINED_1,
    H.SALARY,
    H.PEC_END_DATE,
    H.REASON_CODE,
    H.PEC_WAIVED,
    H.BILL_EFFECTIVE_FROM_DATE,
    H.BILLED_THRU_DATE,
    H.PAID_THRU_DATE,
    H.SUBSC_DEPT,
    H.SUBSC_LOCATION,
    H.USE_EFT_FLG,
    H.BENEFIT_START_DATE,
    H.SEQ_ENROLLMENT_RULE,
    H.MCARE_RISK_ACCRETION_DATE,
    H.MCARE_RISK_DELETION_DATE,
    H.MCARE_RISK_REFUSED_DATE,
    H.COMMENTS,
    H.USER_DEFINED_2,
    H.USER_DEFINED_3,
    H.RATE_TYPE,
    H.PCPAA_OCCURRED,
    H.PRIVACY_ON,
    H.PCP_CHANGE_REASON,
    H.SITE_CODE,
    H.SEQ_SITE_ADDRESS_ID,
    PM.seq_prov_id rendered_prov
    from hsd_member_elig_history H,
    INC.PCP_REASSIGN_RPRT_DATA P,
    hsd_prov_master PM
    where P.subscriber_id = H.subscriber_id
    and P.rendered_pcp = PM.provider_ID
    and H.elig_status = 'Y'
    and (H.term_date is NULL or H.term_date >= last_day(sysdate))
    order by H.Seq_memb_id;
    begin
    for C in select_cur loop
    rec_cnt := rec_cnt + 1;
    update hsd_member_elig_history
    set term_date = TRUNC(SYSDATE - 1),
    term_reason = 'PCPTR',
    update_datetime = SYSDATE,
    update_user = USER,
    update_process = 'TD33615'
    where seq_elig_hist = C.seq_elig_hist
    and seq_memb_id = C.seq_memb_id;
    INSERT INTO HSD_MEMBER_ELIG_HISTORY
    (SEQ_ELIG_HIST,
    SEQ_MEMB_ID,
    SEQ_SUBS_ID,
    SUBSCRIBER_ID,
    PERSON_NUMBER,
    EFFECTIVE_DATE,
    TERM_DATE,
    TERM_REASON,
    RELATIONSHIP_CODE,
    SEQ_GROUP_ID,
    PLAN_CODE,
    LINE_OF_BUSINESS,
    RIDER_CODE_1,
    RIDER_CODE_2,
    RIDER_CODE_3,
    RIDER_CODE_4,
    RIDER_CODE_5,
    RIDER_CODE_6,
    RIDER_CODE_7,
    RIDER_CODE_8,
    MEDICARE_STATUS_FLG,
    OTHER_STATUS_FLAG,
    HIRE_DATE,
    ELIG_STATUS,
    PREM_OVERRIDE_STEP,
    PREM_OVERRIDE_AMT,
    PREM_OVERRIDE_CODE,
    SEQ_PROV_ID,
    IPA_ID,
    PANEL_ID,
    SEQ_PROV_2_ID,
    SECURITY_CODE,
    INSERT_DATETIME,
    INSERT_USER,
    INSERT_PROCESS,
    UPDATE_DATETIME,
    UPDATE_USER,
    UPDATE_PROCESS,
    USER_DEFINED_1,
    SALARY,
    PEC_END_DATE,
    REASON_CODE,
    PEC_WAIVED,
    BILL_EFFECTIVE_FROM_DATE,
    BILLED_THRU_DATE,
    PAID_THRU_DATE,
    SUBSC_DEPT,
    SUBSC_LOCATION,
    USE_EFT_FLG,
    BENEFIT_START_DATE,
    SEQ_ENROLLMENT_RULE,
    MCARE_RISK_ACCRETION_DATE,
    MCARE_RISK_DELETION_DATE,
    MCARE_RISK_REFUSED_DATE,
    COMMENTS,
    USER_DEFINED_2,
    USER_DEFINED_3,
    RATE_TYPE,
    PCPAA_OCCURRED,
    PRIVACY_ON,
    PCP_CHANGE_REASON,
    SITE_CODE,
    SEQ_SITE_ADDRESS_ID)
    values
    (hsd_seq_elig_hist.nextval,
    C.SEQ_MEMB_ID,
    C.SEQ_SUBS_ID,
    C.SUBSCRIBER_ID,
    C.PERSON_NUMBER,
    trunc(SYSDATE),
    C.TERM_DATE,
    C.TERM_REASON,
    C.RELATIONSHIP_CODE,
    C.SEQ_GROUP_ID,
    C.PLAN_CODE,
    C.LINE_OF_BUSINESS,
    C.RIDER_CODE_1,
    C.RIDER_CODE_2,
    C.RIDER_CODE_3,
    C.RIDER_CODE_4,
    C.RIDER_CODE_5,
    C.RIDER_CODE_6,
    C.RIDER_CODE_7,
    C.RIDER_CODE_8,
    C.MEDICARE_STATUS_FLG,
    C.OTHER_STATUS_FLAG,
    C.HIRE_DATE,
    C.ELIG_STATUS,
    C.PREM_OVERRIDE_STEP,
    C.PREM_OVERRIDE_AMT,
    C.PREM_OVERRIDE_CODE,
    C.SEQ_PROV_ID,
    C.IPA_ID,
    C.PANEL_ID,
    C.SEQ_PROV_2_ID,
    C.SECURITY_CODE,
    SYSDATE,
    USER,
    'TD33615',
    SYSDATE,
    USER,
    'TD33615',
    C.USER_DEFINED_1,
    C.SALARY,
    C.PEC_END_DATE,
    C.REASON_CODE,
    C.PEC_WAIVED,
    C.BILL_EFFECTIVE_FROM_DATE,
    C.BILLED_THRU_DATE,
    C.PAID_THRU_DATE,
    C.SUBSC_DEPT,
    C.SUBSC_LOCATION,
    C.USE_EFT_FLG,
    C.BENEFIT_START_DATE,
    C.SEQ_ENROLLMENT_RULE,
    C.MCARE_RISK_ACCRETION_DATE,
    C.MCARE_RISK_DELETION_DATE,
    C.MCARE_RISK_REFUSED_DATE,
    C.COMMENTS,
    C.USER_DEFINED_2,
    C.USER_DEFINED_3,
    C.RATE_TYPE,
    C.PCPAA_OCCURRED,
    C.PRIVACY_ON,
    C.PCP_CHANGE_REASON,
    C.SITE_CODE,
    C.SEQ_SITE_ADDRESS_ID);
    commit_cnt := commit_cnt + 1;
    if (commit_cnt = 1000) then
    dbms_output.put_line('Committed updates for 1000 records.');
    commit;
    commit_cnt := 0;
    end if;
    end loop;
    commit;
    dbms_output.put_line('Total number of MEMBER_ELIG_HISTROY records inserted : ' ||
    rec_cnt);
    exception
    when others then
    raise_application_error(-20001,
    'An error was encountered - ' || sqlcode ||
    ' -error- ' || sqlerrm);
    end;

    user10305724 wrote:
    I have tried both the Case statement and Decode function in Select cursor, but both the things are not working. Please define what you mean by not working even if your computer screen is near the internet we can't see it.
    You should also look at the FAQ about how to ask a question
    SQL and PL/SQL FAQ
    Particularly *9) Formatting with {noformat}{noformat} Tags* and posting your version.
    know the reason why decode is not working, I heard some where Case statement do not work with 8i.
    Does this mean you are using 8i? Then scalar sub queries - selects within the select list, are not supported, along with CASE in PL/SQL.
    Select DECODE(1,
    * (Select 1
    from hsd_prov_contract R
    where R.seq_prov_id = PM.seq_prov_id
    and R.line_of_business = H.line_of_business
    and R.PCP_FLAG = 'Y'
    and R.participation_flag = 'P'
    and SYSDATE between R.EFFECTIVE_DATE AND
    NVL(R.TERM_DATE,
    TO_DATE('31-DEC-9999', 'DD-MON-YYYY')))*,
    'Y',
    'N') PAR_FLAG,
    >
    exception
    when others then
    raise_application_error(-20001,
    'An error was encountered - ' || sqlcode ||
    ' -error- ' || sqlerrm);
    http://tkyte.blogspot.com/2008/01/why-do-people-do-this.html                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • DECODE does not work with alphabetic data in ODER BY clause

    The following ORDER BY clause works when no parameters are involved. The data in the columns is alphanumeric. The first column is NUMBER in the Oracle database. The second is VARCHAR2. The last two are CHAR. It works fine with alphabetic and alphanumeric information in the last 3 columns.
    ORDER BY
         lin_itm_nr, eng_draw_nr, cage_cd, furn_meth_cd
    However, when a DECODE is used to sort by just one field only, using the :TheSortCriteria paramater, Oracle Reports gives a "ORA-01722 invalid number ==> column-name" error where column-name is a column where the data is not all 0 through 9 values
    DECODE (:TheSortCriteria,
    1, lin_itm_nr,
    2, eng_draw_nr,
    3, cage_cd,
    4, furn_meth_cd
    Will the DECODE statement work when sorting VARCHAR2 columns with alphabetic and alphanumeric data?
    Or will it only accept numeric data in VARCHAR2 and CHAR fields?
    Thanks,
    DT

    Syntax:
    DECODE ( expr , search , result [, search , result]... [,default] )
    Your usage:
    DECODE (:TheSortCriteria, <expr>
    1, <search>
    lin_itm_nr, <result>
    Oracle9i SQL Reference (direct link follows) has this to say about DECODE:
    "Oracle automatically converts expr and each search value to the datatype of the first search value before comparing. Oracle automatically converts the return value to the same datatype as the first result."
    First stmt says: TheSortCriteria parameter has to be of number datatype or has numeric values if character datatypes, which I think is the case here.
    Second stmt says: Since the first result is of number datatype, Oracle tries to convert the other results to number, which is why you're getting the error when the column-name is not numeric.
    Try putting either of the other three columns as the first result and it should work (the number column will be converted to char, which is fine).
    http://otn.oracle.com/docs/products/oracle9i/doc_library/901_doc/server.901/a90125/functions33.htm#1017439
    BTW,
    when you see ORA-## in the error message, it points to Oracle error (not Reports error). In such cases, try running the query in SQL*Plus. If you see the same error, then check out the Oracle Database documentation for more info.
    Hope that helps...

  • DVD Decoder Card Not Working

    I have a lombard 333 that I have a dvd decoder card installed in. It also has a dvd drive. When I put a dvd in, it shows up on the desktop and seems to work fine, but when the dvd player opens it says the dvd player is not compatible with this machine. The decoder card shows up in the toolbar at the top of the screen. I tried other dvd drives with no luck. I also put the card and dvd drive in another lombard 333 which did the same thing. I have used the lombard and card before to play dvd's with no problem, now it does not work. What is wrong? Could my card have gone bad? Is there a way I can fix it? Thanks

    Mac,
    Unfortunately, no version of OSX supports DVD Player on the Wallstreet or Lombard. I am assuming you are booting into OSX since you have listed 10.4.8 as your OS. The only workaround is to boot into 9.x to play DVDs.

  • Pdf email attachments - error msg after download "not decoding" - creating DWORD key did NOT work!

    I went to REGEDIT and installed the DWORD key as suggested by ADOBE to fix problem created by security update & it did NOT work!! Attempting to save then open the files gives same error msg.  I sent multiple emails from a book scanner at the library with pdf files in quick and searchable formats & neither will open! Someone else that I forwarded the email to was able to open with no problem & he is running version 10.  There is no option to load earlier versions!!!!  I am running version 11 on Windows XP.

    I scanned hundreds of pages using a book scanner @ the law library - the USB port was not working so I had to choose the send by email attachment option. Received 30 emails & NONE (so far) of the pdf attachments will open - the error msg states "Reader could not open "doc" because it is either not a supported file or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)." I forwarded 2 emails to someone else running version 10 - he had no prob opening from email (I have version 11 & then I also reinstalled 9.5 & STILL getting the same error msg)! Used someone elses's computer who is running version 10 & same error msg. Each time I try a fix I then go to a 'new' unopened email & attempt to open an attachment that hasn't been previously downloaded. Adobe supposedly has a fix - from Regedit - create DWORD key @ HKCU/Adobe/Reader/11/AV General "bValidateBytesBeforeHeader" - I did that & restarted computer each time I installed etc - still NO solution! So unless you have another idea I have a THIRD 6 hour roundtrip to the Law Library in KC in my near future!
    Drew Davis
    Sent from my BlackBerry® powered by Virgin Mobile.

Maybe you are looking for

  • I get an error message when trying to connect my iphone to a lenovo thinkpad

    I cannot get my Iphone to work on the Lenovo Thinkpad edge 520, when I connect the phone it brings up an error saying there was a problem loading the device. In the control panel I get a yellow exclamatin mark next to the mobile usb device. I tried t

  • Opening PDF Files Not Working Sporadically

    I inherited a VB.Net Windows application. It uses MDI Parent and MDI Child forms. Two of the child forms have viewers that open PDF files. In both cases the child forms are launched and the PDF file opened when the user selects a menu item. My applic

  • JSAPI, speech output to file ???

    Hi all, I am not new to Java but using JSAPI first time, I have downloaded an example code which takes an Ascii string and speek accordingly, which can be hear on headphone. This code is working fine. Now I would like to know that how can I get spoke

  • Is it possible to revert to Garageband 1 from Garageband 2?

    Hi - the adventures in music making continue. My sister and I were trying to get more expertise in Garageband, and more sophisticated instrumentation, so I upgraded a few days ago. First to Tiger (great; classic programs do run more slowly than in Ja

  • Need to Refresh to Watch Movies...

    I need to refresh the page after loading the full movie to watch it. Clips like Apple Ads are one of the examples. I have tried to use the solution from http://discussions.apple.com/thread.jspa?messageID=5908684&#5908684. But I can't find the line "<