format code may not appear in the format of the date - IW related

Hello

Please explain what I'm doing wrong:
SQL>  select to_char(sysdate, 'YYYY-IW') from  dual;

TO_CHAR
-------
2010-48

SQL>  select to_date('2010-22', 'YYYY-IW') from  dual;
 select to_date('2010-22', 'YYYY-IW') from  dual
                           *
ERROR at line 1:
ORA-01820: format code cannot appear in date input format
Oracle 9.2.
Kind regards.
Greg

First of all, you should stay with the date format. Instead of converting it to a string, you could TRUNCATE until the first day of the Iso-Wekk.

And to allow the use of the index that you just have to put a certain range on your queries.

example of

select *
from t
where col_date  >= trunc(sysdate, 'IW')  ;

If col_date can contain values greater than System. Or if you use another value date to compare as sysdate. Next, you need to compare with a range. Just like that

select *
from t
where col_date  >= trunc(sysdate, 'IW')
and col_date  < trunc(sysdate, 'IW')+7 ;

If you want to enter a certain WEEK and get all entries this week, you can start with the first day of the iso year and add the number of weeks.

example of using iso-week 40

select *
from t
where col_date  >= trunc(sysdate, 'IYYY')  + 7 * 40
and col_date  < trunc(sysdate, 'IYYY')+7 * (40 +  1);

However the arithmetic calendar is complex. Be careful for special cases. For example, the beginning of the ISO year 2011 is January 3, 2011. So, if we organize this logic on the first or second of January * 2011 * we would get the week civil 40 of * 2010 *. It's probably not what you want.

To account for this, we must ensure that we use the correct year. There are several possibilities how do. In this case, I choose to use the normal TRUNK for the first day of the normal year (1.1.2011) then add a week and truncate again.

example of

select *
from t
where col_date  >= trunc(trunc(sysdate,'YYYY)+7, 'IYYY')  + 7 * 40
and col_date  < trunc(trunc(sysdate,'YYYY)+7, 'IYYY')+7 * (40 +  1);

Published by: Sven w. on December 3, 2010 08:52

Tags: Database

Similar Questions

  • disposition of the text may not appear in the components Panel

    layout of text installed extension, the extensions Manager show but do not appear in the components Panel.
    where is the problem?

    Thank you
    I find files of layout of the text in "Settings\Application Data\Adobe\Flash CS4\NIL\Configuration" and then copy the files to "Settings\Application Data\Adobe\Flash CS4\en\Configuration.
    and then, my problem is solved.
    I use win xp and farsi language.

  • changes made to the code do not appear in the file swf, even trace instructions not.

    I just picked up a clients flex project and I can't get the app to reflect even a simple statement trace.

    Before that I took over, the project was built last successfully with the environment/sdk Flash Builder Beta 2. I have the latest version of Flash Builder 4.

    To import the project into FB4, I get a ton of errors.  Most of them, mainly because of changes made to the beta2 sdk for free.

    Some of the things that I fixed:

    -mx to library://ns.adobe.com/flex/mx library://ns.adobe.com/flex/halo namespace

    -player video count: many names of the State for the video player component had been changed, more correctly States had been added.  There are also other related component video and property names that needed to be updated.

    But I have corrected this and the application is finally able to compile (but with a few caveats the type of variable in double especially)

    The only thing is now that any change I make to the project is not reflected in the build (debug or release).  I have changed the existing traces, added additional traces. Nothing is displayed.  I even removed the applicationComplete property in the main.mxml.  Still, everything worked as nothing has changed.

    Also I can't debug the application.  Whenever I try to debug... Flash builder said... "Swf application contains no debug information required...". "

    Anyone has any idea how to even begin to tackle this? Any help or pointers would be greatly appreciated.

    Hello

    Have you tried to project-> 'clean' the project?

    Also, instead of wasting more time with the import, I try and create a new project in FB 4 and copy all the code sorce and assets in the new project. Flex 2 has been a long time ago.

    Mike

  • mail code do not appear in the web page

    I want to send email, so I put the following in an index.cfm file test code:

    " < intrusion via cfmail to = ' [email protected] "from =" [email protected] "subject =" Hello There "> Hello! "

    Test < / intrusion via cfmail >

    intrusion via cfmail < p > < /p >

    When I view the source of the page of the web page, I only see "intrusion via < /p > < p > cfmail.
    I don't see "< intrusion via cfmail to =... < / intrusion via cfmail >.»
    Help, please.
    Thank you.

    Have you checked the files in Directory / log underliverable mail to see if errors have been encountered?

    You can consult the section "Sending and reception of e-mail" documentation of the CF for more information on troubleshooting e-mail issues.

    http://help.Adobe.com/en_US/ColdFusion/9.0/developing/WSc3ff6d0ea77859461172e0811cbec22c24-782a.html

  • How to solve [' &lt; ' may not appear in the attribute value]

    Set the attribute value to inputText as follows:
    value="#{bean.newMode==true ? '<auto>' : bean.someValue}"
    but I got the error in the title.

    I tried to add a '-' before ' < ',.
    but still does not work.

    Thank you.

    Kevin.

    Try

     & lt; and & gt; 
    

    Remove the space after the &

    Timo

    Published by: Timo Hahn 25.06.2009 at 09:17

  • I have a new computer with Windows 7 Professional, Office 2007, Adobe XI. I just created a word document and tried save it in PDF format, but the PDF option does not appear in the menu dropdown. Any ideas please? Thank you.

    I have a new computer with Windows 7 Professional, Office 2007, Adobe XI. I just created a word document and tried save it in PDF format, but the PDF option does not appear in the menu dropdown. Any ideas please? Thank you.

    What is "Adobe XI" - Reader or Acrobat?

    But, "Save as Adobe PDF" is a function of Word, independent of this Adobe software, you have installed.

  • Bought 5 Lightroom online from Best Buy.  When I enter the redemption code, I get an error message indicating "Oops!" This code does not appear to be active.  Please contact the retailer or enter a different code. "I contacted Best Buy; they indicate that

    Bought 5 Lightroom online from Best Buy.  When I enter the redemption code, I get an error message indicating "Oops!" This code does not appear to be active.  Please contact the retailer or enter a different code. "I contacted Best Buy; they indicate that the code has been validated.

    Make sure that you're not confuse common lookalikes (for example, 1 l, or 0 and o).  Then go to their store with your redemption code, sign in to adobe.com using one of their computers store and show them what you're doing to redeem your code.

  • Why my favicon will not appear when the code and the favicon.ico file are correct? I use Dreamweaver CC.

    I tried several manufacturers of .ico file and uses the code < link rel = "shortcut icon" href = "' / favicon.ico" / > in the < head > section and the favicon.ico is sitting above the index file, but it does not appear on the tab in Firefox or IE. " I also tried many drawings, I thought that this could be the problem - here are a few FLiAP-rev2.jpg and FLiAP-Rev3.jpg . What I am doing wrong? I have tried everything and google everything. I also use the PC, but I hope that this does not prevent Mac users for helping me.

    Thanks Jon. As I said to Nancy, the Favicon has finally shown this morning. But also thank you for another time saving Council which has saved me a lot of time and effort and is not mentioned anywhere. You're right,'there is really no reason to add the code in theIf the favicon.ico is located in the root of your site. Just he place here will work in all browsers.«I put only the code on my page index because I wasn't sure he would ever show upward, and, when he did finally this morning, he did on all pages and they had no code.»

    It is regrettable that on all Web sites (and I read what was like all the) dealing with the Favicons, nobody mentions these points. It's simple

    1. create the 16px by 16px favicon.ico
    2. Place it in the root of the site
    3. Clear your cache and bookmark the page
    4. Waiting - it prove, possibly the next day.

    Margaret

  • New hard drive does not appear in the disk utility

    I am installing a new hard drive in my late 2011 13 "MacBook Pro. I started using apple's online retrieval system and went to disk utility. I tried to format the drive, but he is stuck saying "remove disc" for about a half hour, and then I had a rotation beach ball and could not move the cursor. I restarted the computer and now the drive does not appear in the disk utility. Any help is appreciated as I have no idea where to go from here.

    Thank you.

    You will may be turned off and check that your hard drive is correctly positioned with all the screws tight.

  • Zoom mid side decoder does not appear in the plugins to THE

    I do not have my Zoom H2n yet but I downloaded the mid side decoder to have a peek and it does not appear in the list of plugins. You can download both at THE and VST so I downloaded to THE and it is saved in/Library/Audio/Plugins/Components. This would not appear in the logic so I downloaded VST that is registered in the Library/Audio/Plugins/VST and who does not show not more. This happened to someone else? How to overcome it?

    #1 X Pro logic can only use the plugins to THE (Audio Unit) no VSTs...

    #2 X Pro logic can only use 64-bit plugins to THE Zoom plugin is available in the old format of 32 bits...

    There is every reason why you can't find it... or use in Logic Pro X.

  • CD rom does not appear in the start menu in lenovo G500 windows 8

    Hello
    I want to format my lenovo G500 windows 8 and install windows 7 but I can't because the CD rom does not appear in the start menu

    Hi obaid, welcome to the forums.

    you will need to change some parameters in the BIOS, these changes are explained below related to the thread.

    http://forums.Lenovo.com/T5/Lenovo-3000-and-essential/downgrading-from-Windows-8-to-Windows-7-on-Len...

  • Why isn't the subwoofer in my HP Pavilion DV7 3067 CL does not appear in the management of Base of IDT?

    According to the description of the topic my subwoofer does not appear in the section base of IDT of the settings control panel management. My drivers are updated and current, not viruses or malware that infect the system and the subwoofer is physically present and should be functional but it is not. Someone at - he no clue as to what can be wrong? Links as a result of the laptop. If more information is needed please ask. Thank you in advance.

    http://h30038.www3.HP.com/assets/Usen/datasheets/Pavilion_dv7-3067cl_Entertainment_Notebook_PC_Sams _...

    http://support.HP.com/us-en/document/c01890529

    How are you Laeadern? Well, if you have not set the tone, you're not alone it seems computers laptops without the function of his Beats from HP does not have the tone control feature, or it is a feature of Windows Ultimate?... I have Windows Professional dv6, select fairly recent edition (bought this summer), I have no dial tone featured in sounds in the control panel.

    But in regards to low values and change them, I think you can change thorugh the IDT Audio software.

    Go to control panel and click on "IDT Audio Control Panel."

    Then on the albums tab, select read and on the left select speakers and headphones

    Under the menu that falls under the speakers and headphones select EQ

    Now you should see a menu with cursors for various changes in lower values if I'm wrong?

    You can also increase the low values in Sound and go to playback devices, select speakers and the headphones and then on the bottom 'Properties' and in the Properties tab improvements and check Bass Boost and hit the settings for Bass Boost and then check what is the frequency of 80 Hz and 3 dB optimization level. Also in the Properties window for helmet speakers and go to the Advanced tab and change the format of "24-bit", 96000 Hz (Studio quality)

    If you still don't see not your look of subwoofer by activating your subwoofer try these changes in the following link:

    http://Forum.NotebookReview.com/5668647-post3614.html

    Do not forget to easily cancel your changes changes unlike pressing generally 'Default' as in IDT of equalization you can manually return the sliders back to zero, or select the preset "Default". In the sounds, you can hit the default or change the default settings, good luck and these changes above should least improve your sound quality, I hope this works.

  • I've recently upgraded to Office 2016 and also got the latest version of Acrobat Pro, but the Acrobat option does not appear in the Office components. How to make this work?

    I own Acrobat Pro and downloaded the latest version. I also improved my 2016 from office to office, but the Acrobat option does not appear in the Office components like previously in 2013 office. How can I get that back? I often secret several worksheets in PDF format and it is tedious to print them one at a time and then combine. I used to be able to select all the worksheets I wanted and combine them in one go.

    Hi steverobb,

    Acrobat XI is not compatible with Office 2016 for the moment. Please wait for future updates.

    Kind regards
    Nicos

  • Custom web fonts do not appear in the published content

    Hello

    I use web fonts custom model Edge animate successfully, but when I publish the dashboard content animate, referenced (in the .css file) fonts do not appear in the published folders.

    Content of the CSS file:

    {@font-face}

    font family: "icon-police."

    SRC:URL("fonts/icon-font.EOT");

    SRC:URL("fonts/icon-font.EOT?#IEFix") format("embedded-opentype"),

    URL("Fonts/Icon-font.WOFF") format ("woff"),

    URL("Fonts/Icon-font.ttf") format ("truetype"),

    URL("Fonts/Icon-font.svg#Icon-font") ("svg") format.

    }

    I tried editing for "Web", "Animate the Deployment Package" and "iBooks / OSX" all this without a bit of luck.

    Y does it have that no way embed the font when publishing?

    Thank you in advance,

    CG.

    I could see the number of folder 'fonts' not getting copied for publish destination. It looks like a bug.

    Please report to us.

  • Adobe Premiere 6.5 - Why is my video not appearing in the monitor window

    I have a compressed .avi clip that I imported into my project file in Adobe Premiere 6.5. I did slide the clip on my calendar.  In the clip window, this one appears fine, but for some reason any, it will not appear in the monitor window.

    How can I do to fix this?

    Thank you

    This Xvid CODEC will probably never import and edit properly.

    Go to the source material, before the Xvid compression, or convert to DV - AVI (if SD material) and that importation.

    Take a look at this ARTICLE on AVI (and other formats) as a 'wrapper '.

    Good luck

    Hunt

Maybe you are looking for