Serious date problem

I am using Form 6i.
I am getting serious date problem.
The MM/DD/RRRR is converted to DD/MM/RRRR and the result is false record.
How to avoid this serious problem. I am very shocked to find this error after few hours of brainstorming session.
I am using following query to create cursor
[htm]     CURSOR cur_first IS SELECT      a.item_code,
     b.item_description,
     a.lot_no,
     d.name model,
     c.vendname,
     date_of_purchase,
     warrenty_upto,
     quentaty,
     rate,
     pc_type,
     TO_DATE(decode(warrenty_flag_yn,
                    'W', TO_DATE(warrenty_upto),
                    'A', TO_DATE('31-MAR-'||v_year),
                    'X', TO_DATE('31-MAR-'||v_year)),'DD-MM-RR') AS amc_date
     FROM      pc_item_procurement_history a,
                    pc_item_master b,
                    pc_vendor_master c,
                    pc_model_master d
     WHERE a.item_code= b.item_code
     AND a.modelcode=d.modelcode
     AND a.vendcode=c.vendcode
     AND (b.item_description LIKE '%'||:blk_main.item_name||'%' OR :blk_main.item_name IS NULL)
     AND (TO_DATE(a.warrenty_upto,'DD-MM-RR') <= :blk_main.to_date OR :blk_main.to_date IS NULL)
     AND warrenty_flag_yn='W'
     ORDER BY b.item_description;
/pre][html]
Thanks and regards,
Vikas                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

I've just noticed something in the where clause that makes all this a lot easier.
     CURSOR cur_first IS SELECT      a.item_code,
     b.item_description,
     a.lot_no,
     d.name model,
     c.vendname,
     date_of_purchase,
     warrenty_upto,
     quentaty,
     rate,
     pc_type,
     warrenty_upto AS amc_date
     FROM      pc_item_procurement_history a,
                    pc_item_master b,
                    pc_vendor_master c,
                    pc_model_master d
     WHERE a.item_code= b.item_code
     AND a.modelcode=d.modelcode
     AND a.vendcode=c.vendcode
     AND (b.item_description LIKE '%'||:blk_main.item_name||'%' OR :blk_main.item_name IS NULL)
     AND (a.warrenty_upto <= :blk_main.to_date OR :blk_main.to_date IS NULL)
     AND warrenty_flag_yn='W'
     ORDER BY b.item_description;BUT...
Is Warrenty_upto really a date column? You say it is "stored as m/d/yyyy" but a date is not stored with a format in oracle - it's just a date and the format is applied when you retrieve the data.
In sql*plus if you Describe the table you can see the column type. If you select the data you only ever get a string.
I'm assuming :blk_main.to_date is a date.

Similar Messages

  • Serious data problem!!!!! Help please

    Hi,
    I working on some kind of crazy stuff..........
    There is a customer table
    With columns and sample data
    ID----01
    natl- acct_num ------3456
    SUB_grp_Acct_num ----2678
    cust_acct _num ( this is commmon one to ther tables as well)-----1234
    Cust_join-date---------- 01/01/2008
    Cust_close_date ------ 01/01/2009
    Grand_acct_num---------
    reason_For_close-------
    Cust_status--------
    Cust_type---------
    CUST_effective_dt-------
    Cust_expiration_dt------ 12/31/2008
    CUSt_class--------- can be EXISTING or TR -Transfered to other one of our partners (i am assuming this is causing problem)
    Ok my problem here it is .....in the table data ....i see *2 or 3 records of* ---- Cust acct number for the same date.......Is there is any way we could look at one record of cust acct number.....
    Any suggestion would be greatly appriciated.
    Thank you!!!
    Edited by: user642297 on Oct 2, 2008 1:52 PM

    Well these are not duplicate records....
    And i m using TOAD i dont see any primary keys defined to these table. IS that is causing some problem ????
    Yangkuan .....i think u were able to understand my question i guess.......the different columns are
    CUST_effective_dt-------
    Cust_expiration_dt------
    CUSt_class
    these are the columns which are different....in my opinon these might be some problem with the logical design of the table.
    any thoughts please!!!!

  • Serious performance problems

    Hi
    I am having some very serious performance problems witgh java web start. I have a swing client that transmits XML/HTTP to and from a server, parses it, etc... I am finding that the XML/HTTP data request
    is a factor of 10 to 100X slower, at least, using Java Web Start than without.
    Any suggestions would be helpful
    Thanks
    Charles

    Charles,
    I've also observed some overhead when running an application deployed with JAWS compared to running the application from the jar, or in my dev environment.
    After searching these forums a bit, I found this buried nugget of info: Try System.setSecurityManager(null) if you are requesting <all-permissions/> already.
    Before the workaround, my application was taking 194 seconds for a single analysis run. After this workaround was applied, the same analysis run took only 82 seconds.
    So as you can see, there is considerable overhead associated with performing operations through the layers of security (my guess). My particular application does a lot of disk I/O (which is probably something the security manager watches closely).
    I stress the 'workaround' aspect of this because I haven't fully investigated the ramifications of using it, but eventually this might turn into a bug submission (because if I'm already requesting all-permissions, why do I still need to do setSecurityManager(null)?).
    At any rate, hope this helps!
    -jw

  • Sir since update of ios 8.1.2 i got serious battery problem on 3g 4.30 hrs my battery gets low and sometimes serious net probelms please give an update for this issue its not alone me my friends too getting many problem lcommonly battery problem

    sir since update of ios 8.1.2 i got serious battery problem on 3g 4.30 hrs my battery gets low and sometimes serious net probelms please give an update for this issue its not alone me my friends too getting many problem commonly battery problem please can this be resolved
    its not related to any hardware because last year april i got replacement new phone from apple and i maintained it well...!

    Probably apps running in the background are causing this, sometimes Mail get's stuck connecting to the mail server, or some social media app like Facebook can also be a reason for prolonged background activity.
    Try to reset the phone by holding the sleep and home button for about 10sec, until the Apple logo comes back again. You will not lose any data by resetting, but it can cure some glitches.
    If this does not help, setting it up as new device would be the next step:
    How to erase your iOS device and then set it up as a new device or restore it from backups
    Also take a look at these tips to prolong the battery life again:
    http://www.overthought.org/blog/2014/the-ultimate-guide-to-solving-ios-battery-d rain

  • Help needed with missing data problem in CRVS2010

    We recently upgraded the reporting engine in our product to use Crystal Reports for Visual Studio 2010 (previously engine was CR9). Our quote report, which has numerous subreports and lots of conditional formatting, started losing data when a quote took more than a single page to be printed. We knew the SQL results included the data, but the report was not printing those lines at all or sometimes printing a partial line. In addition, the running total on the report would exclude the lines that were being missed on the next page. In one example submitted by a customer, 3 lines were skipped between pages.
    I think I have identified two potential issues that document the possibility of data not being included in the report.
    The first potential issue is an issue with the "suppress blank section" option being checked. This issue is supposedly fixed with ADAPT01483793, being released someday with service pack 2 for CRVS2010.
    The second potential issue is using shared variables. This issue is supposedly fixed with ADAPT01484308, also targeted for SP2.
    Our quote report does not explicitly use shared variables with any of the subreports, but it does have several subreports, each in its own section that has the "supress blank section" option checked. We have other reports that use this feature, as well, and they are not exhibiting the problem.
    One different thing about the quote report is that it has a section with multiple suppression options selected. The section has a conditional suppression formula, which controls whether the section is included at all within the report. The section also has the suppress blank section option selected. There are multiple fields within the report that are each conditionally suppressed. In theory, the section's suppress formula could evaluate to true, yet all of the fields within the section are suppressed (due to null values), and then the "suppress blank section" option would kick in.
    The missing data only seems to happen when the section is not being suppressed, and at least one of the fields is being included in the report. If I clear the "suppress blank section" check box, and change the section formula to also include the rules applied to the fields in the section, the missing data problem seems to be resolved.
    Is this related to ADAPT01483793? Will it be fixed in service pack 2?
    If more details are needed, I would be happy to provide a sample report with stored data.

    Hi Don,
    Have a look at the Record Selection formula in CR Designer ( stand alone ) and when exported to RPT format opening that report in the Designer also. 
    There's been a few issues with => logic in the record selection formula. It could be you are running into this problem. Look for NOT inserted into your selection formula.
    Oh and SP2 is coming out shortly so it may resolve the issue. But if you want you could purchase a support, or if you have a support contract then create a case in SMP and get a rep to work with you to debug the issue.
    If you have not try the Trial Version of CR 2011, put it on a VM-ware image or Test PC so you don't corrupt anything for production and have a look at and test it in that designer also. If you purchase a case and it is a bug then you'll get a credit back for the case.
    Don
    Edited by: Don Williams on Oct 26, 2011 7:40 AM

  • Clearing of Balance in GR/IR clearing account due to date problem

    >Hi to All,
    >The scenario is like this :-
    >The client is making back dated entries for quarter between 01.04.2008 to 30.06.2008 in SAP in July 2008 as the system is getting implemented now. He wants to regularise all the transactions in SAP from 01/04/2008.
    >The users entering the data were new and hence though the miro and payment entries were made by F&A in back date. The Purchase Orders and the GRs were prepared in the current date of July 2008.
    >Because of this date problem the GR/IR clearing account is having balance in it, which should have been clear after the processing of the miro document.
    >The documents were handed over to f&a after preparation of GR in the systems for Invoice processing through MIRO.
    >Can anyone plz give a solution to clear the balance GR/IR clearing account.
    >Thanks in advance.
    >Ashutosh M Joglekar.

    Hi Muthuraman,
    No need to clear any thing for PO pending items.
    Regards
    Gitesh

  • My macbook pro recently got swiped and I lost all my data, problem is, just before it was swiped I set up my new iphone 5 which transferred all my photos and music over which is no longer on the computer. What will happen to my phone if I plug it in?

    My macbook pro recently got swiped and I lost all my data, problem is, just before it was swiped I set up my new iphone 5 which transferred all my photos and music over which is no longer on the computer. What will happen to my phone if I plug it in?

    I never used icloud before so there is no data to back up from. I just spoke  to the apple store and they said that if I do plug it in, all the data will be swiped....is there a program I can use to transfer my data from my phone to computer without loosing it all ???
    Renee

  • Will apple next update to help fix the location following data problems will the ipod touch 2g be included ?

    will apple next update to help fix the location following data problems will the ipod touch 2g be included ?

    Chances are the 2g itouch will not be included in the update. Also no one yet knows if it will be fixed in the next firmware but apple has said they know of this bug.

  • Serious performance problems on iWeb site

    Can anyone help me find the problem with peterlance.com? It looks like author Peter Lance uses iWeb to update his web site. He redesigned it recently (and did not use iWeb for the old design). Anyway, it has serious performance problems on Internet Explorer, which I was hoping you guys could help pinpoint? Is there something simple I can tell him to try to fix the problem? He is launching a new book on Tuesday so he will be getting a lot of traffic, but for now the response time is not very good. Any suggestions?
    In particular, each new page seems to hang for about ten seconds and freeze using Internet Explorer 6. Any fixes?
    I mean, fixes other than: "Don't use Internet Explorer!"
    http://www.peterlance.com/Peter%20Lance/Home/Home.html
    name="Generator" content="iWeb 1.1.2"

    Welcome to the discussions, TopDog08.
    There are several plain .jpg's and that's good, but you need to convert every .png on the page (or as many .png's as you can) to a .jpg. For example,
    http://www.peterlance.com/Peter%20Lance/Home/Homefiles/shapeimage46.png
    Convert that to a jpg, then replace the graphic and text on the iWeb page with this converted jpg (some have has success using Downsize http://www.stuntsoftware.com/Downsize/)
    The ones you won't be able to do anything about are the ones that are a part of the blog, but that will be only 5 images instead of the many you have now.
    This image
    http://www.peterlance.com/Peter%20Lance/Home/Homefiles/shapeimage50.png
    Is covering part of your menu which is why it appears that only the top half is sensitive to rolling over. You'll have to adjust your layout to account for this.
    Another area to look at, there are white boxed png's surrounding the amazon book covers at the top.
    http://www.peterlance.com/Peter%20Lance/Home/Homefiles/imageEffectsAboveAli%20Mug%20TPI%20jpg.png
    Another set of .png's you'll have to get rid of. How did those get put on the page?
    What you see happening with IE is a java script running to fix IE's problem with png's. The fewer .png's you have, the less of a problem with IE you have.

  • Serious performance problems after updating from 10.5.6 to 10.5.7

    I've got a Macbook Pro C2D 15" (late 2006). After updating the system from 10.5.6 to 10.5.7 and quicktime to 7.6.2, I experience serious performance problems which I have never seen before:
    -From time to time, kernel_task has peaks in activity monitor (consumes a lot of CPU). In that moment, the mouse hangs for a short moment and audio playback is distorted/has drop outs.
    -Recording audio consumes a lot of CPU (independent of the audio application).
    -Video playback consumes a lot of CPU, regardless if I use VLC or the quicktime player.
    Any idea what could be done? Thanks in advance.

    After a few days of using CoolBook I report that my 1st generation MacBook Air is now reliable and never overheating, regardless of environment conditions.
    I must point out that I do believe that it really is something new in 10.5.7 that is causing this problem as my environmental conditions have not changed and even Summer in Dublin still sees temperatures no more than 72F/22C. I am now in Madrid, where the environment is quite different, and I am still having no problem with kernel_task spinning.
    I plan on reporting my problem to Apple anyway and being aggressive about the issue as MacLovinRanga did in this thread (http://discussions.apple.com/thread.jspa?messageID=9647353#9647353). Perhaps many/all of those of us having this problem will obtain new MacBook Airs.
    Joe Kiniry

  • A Full DTP is converted into delta DTP and facing some data problem

    Recently Full DTP(DSO to DSO) is converted into delta DTP , we are facing some data problem in first request.Some data in D2 are not updated properly after just converted in full to delta. Please let me know if you have any idea.
    Example :
    DSO : D1
    DSO : D2
    Previously FULL DTP D1->D2
    Now Delta DTP D1->D2

    Hi,
    First time run of delta DTP will extract all the records from the source...
    As u have already run the Full load and followed by delta,i guess u can use direct change log option...
    rgds,

  • Parsing Date Problem

    I have date problem that I am finding hard to resolve. Please
    suggest me what I could do.
    I want to parse String Date values of formats like "19 Jun 2003" and
    "19/06/2003" to a Date object.
    Can I Do it.
    Thanking in Advance.

    Sure. See SimpleDateFormat#parse.
    Kind regards,
      Levi

  • ***Serious iPod Problems***

    My brother is havign some serious iPod problems. A while ago the battery died after having it for about 2 years. He just had the battery replaced, it will atleast bootup now, but it wont get passed the Apple logo. I can get it to boot into Disk Mode, then reset it, but it still wont get passed the Apple logo. Does anyone have any idea what's happened to it?
    Thanks in advance!
    Matt

    Hi Jeff, thanks for the response, i have been able to do that a bunch of times today, i've even opened up the Disk utility and erased and then done it, no such luck, it just wont get passed the apple screen

  • Serious System Problems. Pictures and Documents folders are opening iPhoto when clicked. iPhoto Library gone.

    I have been speaking to Old Toad for the majority of today trying to fix my iPhoto Library as its become corrupt and I cannot get my photos/videos back into iPhoto. After many many suggestions I seem to have created some serious system problems.
    PLEASE READ ALL OF THIS THREAD...
    https://discussions.apple.com/message/21742033#21742033
    If anybody can be of assisatance that would be a great help.
    I am a mac dummie, recently transfered so foolproof guidance will be helpfull!
    (Unfortunatly.. and now I know the importance, I haven't used time-machine and my mac isn't backed up. If i restore to factory settings I will loose the 600+ photos and videos I had in my iPhoto Library.... which dissapeared, which is the whole reason why I created the first thread)
    Thank you!!

    Linc:
    It appeared to me that somehow the OP's Picture folder was converted into an iPhoto Library as his screenshot of the PIctures folder looked like the inside of a library.
    This statement by the OP make me think it might be more than just an iPhoto issue (the bold text):
    I am unable to drag the Picture folder to the desktop, It wont move, and iPhoto (which is still empty) just opens.
    Some how the same is happening with Documents,
    OT

  • [JHS10.1.3] Date problem

    Running into a date problem for a forms migration.
    I have a date field in the database, normal date field.
    The users want to be able to search on partial dates.
    So adding a between on this field will only generate two date selectors, which is not what they want.
    The format is like a year field, week field, day field.
    I could modify the query to return three extra numeric fields which convert the date to the right format ('yyyy', 'wi', 'dd' ) and then to number and generatie 3 between fields for this.
    This will generate the right layout, 6 input fields for a year from/to week from/to day from/to
    But the query will be like (year between x and x) and (week between x and x) and day (between x and x)
    This will not produce the right results.
    What is possible is a string manipulation of the whereclase in the method getViewCriteriaClause()
    And see if any/all of the fields are filled and build the query there, but this is not a 'clean' solution.
    Any idea on how I can solve this? Basicly a date field in the database, user wants to search that date field on year/week/day between year/week/day or a partial of that.
    This is the way it used to be in the forms application so I really want to give the same functionality with ADF.
    Anton

    Not sure if I completely understand what you said, but this is what I did ( it seems to work )
    All my viewobjects extends a new superviewobjectimp, this class has just 2 setters and getters, one for the datefield I want to search on and one for the partial name I gave the three attributes (<fixed name>Year <fixed name>Week <fixed name>Day).
    In the advancedSearch, in the loop trough the attributes I cast the viewobject to this superviewobjectimp. I can now check if the attribute contains the partial name. If this is the case I build my own string and add it to the viewCriteriaMap.
    One odd thing I found here is that it refuses to let me add a string like
    between to_date( '<startdate>', 'yyyy-mm-dd' ) and to_date( '<enddate>', 'yyyy-mm-dd' )Because if I do this, for some reason the attribute name will be wrapped in a to_char!
    If I just leave:
    between '<startdate>' and '<enddate>'It works, but I dont feel really safe about that, I would rather use the datecast to be sure.
    Any idea how this can be done?
    I also used the java Calendar class to transform a yyyy-iw-d to a yyyy-mm-dd because it seems I cant use 'iw' in a to_date(....). This also solved a problem with partial dates, java will autocomplete them for me.
    In other words if I only supply the year 2005 to 2006 it will auto search from 2005-1-1 - 2006-1-1, same for weeks.
    I have a lot of viewobjects which will require this, I'm trying to make it as solid as I can.
    Any suggestions?
    Anton

Maybe you are looking for

  • Entrada de Conhecimento de Transporte CT-e

    Boa noite, No "novo" processo de recebimento de CT-e (conforme divulgado aqui no forum pela Claudia Wada), a partir da ativacao da condicao CONH na pricing de MM, eh possivel calcular ICMS com condicoes de frete (CIC1, CIC2, etc) a partir da Folha de

  • Creating a Database application

    Hi, I'm new to JSP and Tomcat, I just started learning it last week. I had abit of problem creating a sample Database application. The problem is the JSP works on Tomcat and the database tables is created in Oracle but it the JSP page just comes up b

  • How to change layout of KM Basic Search

    Hi all,        I have a question about the layout of the KM Basic Search. I've created a new Search Component Set in System Administration >System Configuration>KM>CM>User Interface-->Search. I've added search_input_indexes as Component for Basic Sea

  • I bought ringtone thru App Store but it doesn't show up to select it in sounds

    Does anyone know why I can't select text tone after I bought it thru the i tunes store?

  • No attachments in forwarding emails

    When forwarding emails with attachments, the attachments do not go through. Any idea why? Solved! Go to Solution.