Problem with CASE expressions

Using Oracle 10 g R2, plsql in SQL Developer (or TOAD). I have a question 'simple' with the criteria 'complicated' in where clause.
So, it's something like this:

Select the fields in a table
where stuff like Upper(:CategoryId) | '%'
and sub_category_id like Upper(:SubCategory). '%'
and order_date > =: StartDate
and order_date < =: EndDate
and division_id =: Division

Up to this point, the query works fine. Here is where is the problem:
If there is a value in the following parameter field, it works very well, but it is possible that the parameter is null, then I have to test for this first, and if it is empty (or even assigned a 'false' value) then it must restore all settings. The following parameter field is titled: SKU. The reason why I do this first place is to spend several values in a field of single parameter - comma which is great as long as there is some values...

(This works with the above)
and INSTR (Upper(:SKU), table.sku) > 0

And I have a similar problem with another field in the table entitled: catalogue and as: SKU, it works very well if there is at least one input value.

What I tried (who doesn't) is therefore:
and as table.sku (BOX WHEN: SKU = '1' AND '%')
Of OTHER INSTR (Upper(:SKU), table.sku) > 0
END CASE)
Same thing with the catalog:
and as table.catalog (BOX WHEN: catalog = '1' AND '%')
Of OTHER INSTR (Upper(:Catalog), table.catalog) > 0

There must be a way to make this work. I will be grateful for any suggestions that would help in my situation.

What is

select s.sku,
        s.std_cost_ea,
        s.unit_price,
        o.QUANTITY,
        o.order_no,
        o.order_line
from f21.ffct_offer_product_sku s
inner join f21.fmkt_order_detail o
       on s.sku = o.sku
       and s.company_id = o.company_id
       and s.division_id = o.division_id
       and s.offer_id = o.offer_id
       and s.offer_year = o.offer_year
where s.category_id like Upper(:CategoryId) || '%'
and s.sub_category_id like Upper(:SubCategory) || '%'
and instr(Upper(nvl(:SKU,s.sku)), s.sku) > 0
and instr(Upper(nvl(:Offer,s.offer_id), s.offer_id) > 0
and o.order_date >= :StartDate
and o.order_date <= :EndDate
and s.division_id = :Division
and s.version_no = 0

Tags: Database

Similar Questions

  • Problems with Outlook Express 6 in Windows XP

    Dear Sir or Madam:

    My friend has problems with his program of Microsoft Outlook Express 6 on Windows XP computer.

    He has saved all his program of Microsoft Outlook Express 6 e-mail messages.

    There are 2 e-mails corrupt in its Outlook Express 6 Inbox folder; He tried opening and remove these 2 emails corrupted in the Inbox folder, which causes the Outlook Express 6 program stops responding and freeze-up Windows XP. He had to click the end task to close immediately the program Outlook Express 6 is not responding in Windows Task Manager.

    It won't reinstall Windows XP on his computer from scratch.

    Please reply back soon.

    Thank you.

    Same question as above, except the deleted items that is now corrupted. Follow the instructions above, but this time remove Remove Items.dbx with OE closed.

    With all the corruption, you might want to consider a new identity that will give you all the new dbx files and a new registry hive.

    File | Identities | Add the new identity. Create a new one and try it. If all goes well, you can import your messages and address book from the old identity and delete it.

    Note: Do not use the main word in the name of the new identity.

  • Problem with Outlook Express "Message has not been downloaded."

    I'm having a problem with emails and attachments removed once I open and view them.  More specifically, when I opened an e-mail message by using Microsoft Outlook Express 6 with an attachment, I am able to see the file and open the attachment.  However, when I go back to this same email one or two weeks later, I see the following is message "Message has not been downloaded" Outlook Express has not yet downloaded this message. »

    Please let me know what is the cause for this.  I have very important emails that have disappeared.

    In more of Bruce's response, if you lost messages (and it seems you if messages do not appear) and then check your Inbox for a bak file is a backup of the dbx file that you can restore.  See www.oehelp.com/OETips.aspx#2 and see point 4 on retrieving the messages.  I suspect the problem is due to having interference from antivirus software because it is probably what causes this loss, then see item 3 on this page also, as noted in Bruce.

    Steve

  • Problems with Outlook Express (address book, mail open, etc.)

    Hi, I have a strange problem with my outlook express. The program opens ok, it synchronize the e-mail with the servers and so on. If you click on an email in the upper part of the window you can see the content below.
    Now, this is my problem, I can not doubleclick on an email to open it, I can't send an email or forward it. I can't open the address book.
    I get different messages, "it was not possible to open the address book, it cannot be installed correctly", "the message could not be opened, an error has occurred", "it was not possible to load the due address book that Outlook Express is not properly configured. Reinstall Outlook Express"and so on.
    I used this software for many years and the problem came from one day to the other. I tried to uninstall/reinstall the program from the Control Panel, I did a repair on XP installation, but it is always the same, is there anyone who has an idea (I know that Outlook Express is and old program, but it works very well for my needs).

    What about Nils

    First, try a new identity and see if that helps.

    You may have a damaged identity especially if it's the default main identity. File | Identity | Add the new identity. Create a new one and try it. If all goes well, you can import your messages and address book from the old identity and delete it.

    Note: Do not use the main word in the name of the new identity.

    How to create and use identities in Outlook Express
    http://support.Microsoft.com/?kbid=209169

    An Outlook Express basic repair kit:
    http://www.Microsoft.com/Windows/IE/community/columns/oerepair.mspx#ehh

    **************

    If the problem persists, start looking here.

    All of these errors have the same cause.  Something is screwed up with your address book.

    It could be several specific problems, which include:
    -corrupted WAB file
    -damaged or incompatible DLL files for the addressbook
    -have OE set to use the Outlook98 / 2000 + contacts instead of the WAB
    folder and there is something wrong at the end of Outlook

    For more details, take a look at:

    Error message: the Message could not be sent. Some invalid recipients
    (Outlook Express: there was an error opening this message)
    (The address book failed to load. OE is configured incorrectly)
    (Corrupted or incompatible WAB32. DLL file)
    http://support.Microsoft.com/?kbid=239135
    OLEXP: Error Message: failed to load address book
    (There was an error opening this message)
    http://support.Microsoft.com/?kbid=269777
    http://support.Microsoft.com/?kbid=310873
    OLEXP: MSIMN has caused an IPF in Module Wab32.dll
    http://support.Microsoft.com/?kbid=247706
    Error message: failed to load address book, Outlook Express is...
    http://support.Microsoft.com/?kbid=191946
    Error message: could not open address book, a component is missing
    http://support.Microsoft.com/?kbid=192321

    The address book Windows (WAB)
    http://www.insideoe.com/files/WAB.htm

    To share Contacts between Outlook and Outlook Express
    http://www.slipstick.com/contacts/oeshare.htm

    Bruce Hagen MS - MVP [Mail]

  • Problem with PCI Express Root Complex

    I bought a hp 15 t - j100 with Windows, but on windows 8.1 8.1 but I needed to change windows 8 and now I have a problem with the PCI Express Root complex code 28. The disks I have download for hp of the site http://h10025.www1.hp.com/ewfrf/wc/softwareCategory?os=4158&lc=en&cc=us&dlc=en&sw_lang=&product=6521...

    I need help to solve this problem

    Thank you

    and I'm waiting for help

    Hello:

    You need this driver...

    http://h10025.www1.HP.com/ewfrf/wc/softwareDownloadIndex?softwareitem=ob-124661-1&cc=us&DLC=en&LC=en&OS=4063&product=6521374&sw_lang=

  • Problem with case

    What is the problem with the instruction box below. I have error when running. Can someone help me please. Thank you.
    SELECT CRR.ROUTE, CRR.PUBLICATION
     FROM  CIRC.CARRIER_ROUTE CRR, 
                     CIRC_RPT.VW_CARRIER_RATE_DRW VCRD 
                    WHERE CRR.PUBLICATION=VCRD.METHOD_PUB 
                         AND CRR.RATE_CODE=VCRD.RATE_CODE 
                        AND (case when  CRR.ROUTE IN('40011420','40012428') then VCRD.RATE_METHOD ='SBSTD' else VCRD.RATE_METHOD ='SCSTD'  END)

    Varun says:
    What is the problem with the instruction box below. I have error when running. Can someone help me please. Thank you.

    SELECT CRR.ROUTE, CRR.PUBLICATION
    FROM  CIRC.CARRIER_ROUTE CRR,
    CIRC_RPT.VW_CARRIER_RATE_DRW VCRD
    WHERE CRR.PUBLICATION=VCRD.METHOD_PUB
    AND CRR.RATE_CODE=VCRD.RATE_CODE
    AND (case when  CRR.ROUTE IN('40011420','40012428') then VCRD.RATE_METHOD ='SBSTD' else VCRD.RATE_METHOD ='SCSTD'  END)
    

    How can we help if we do not know the error?

    BTW, I find that a bit of discipline on alignment of code allows the readability

    SELECT CRR.ROUTE,
           CRR.PUBLICATION
    FROM CIRC.CARRIER_ROUTE CRR,
         CIRC_RPT.VW_CARRIER_RATE_DRW VCRD
    WHERE CRR.PUBLICATION=VCRD.METHOD_PUB
      AND CRR.RATE_CODE=VCRD.RATE_CODE
      AND (case when  CRR.ROUTE IN('40011420',
                                   '40012428')
                then VCRD.RATE_METHOD ='SBSTD'
                else VCRD.RATE_METHOD ='SCSTD'
           END)
    

    And now that I've lined it up, it sticks out... shouldn't the look of the CASE statement like this:

     AND (case when  CRR.ROUTE IN('40011420',
                                   '40012428')
                then 'SBSTD'
                else 'SCSTD'
           END)
    

    My personal rule is that each item in a list
    -the column names in a SELECT statement
    -a from the table names
    -the conditions in a WHERE clause)
    is listed on a separate line and aligned with the other elements in the list.

    But humans read your code don't care SQL.

  • Problem with regular Expression

    Hello!!
    I have a problem with the regular expression. I want to validate only one word, and second are the same. To do this, I wrote a regex

    Model p=Pattern.compile("([a-z][a-zA-Z]*)\\s\1");
    Matcher m = p.matcher ("nikhil nikhil");
    Boolean t = m.matches ();
    If (t)
    System.out.println ("it's a game");
    on the other
    System.out.println ("is no match);

    The result I get is always 'there no match. "

    Your timely help will be very appreciated.

    Concerning

    Hello.

    You are missing a slash in the regex

    Pattern p = Pattern.compile("([a-z][a-zA-Z]*)\\s\\1");
    Matcher m = p.matcher("nikhil nikhil");
    boolean t = m.matches();
    if (t) {
        System.out.println("There is a match");
    } else {
        System.out.println("There is no match");
    }
    
  • Problem with Application Express

    Hello

    I installed Oracle Application Express, but I have a problem with the connection of the first and the creation of my work space.
    When connecting using the username "admin" and as a user of the sys pwd because so far the only pwd I set when I installed Oracle Express 10 g and Oracle Application Express.
    When I go to the connection, the page seems not to take any command.
    I'm waiting for a help. Thank you

    Hello

    Hope this helps you

    Extract the zip install Apex in C:\temp
    After that, you should have the C:\temp\apex file

    Then to run in SQL as user sys
    @C:\temp\apex\apxldimg.sql c:\temp

    BR, Jari

  • My computer is having a problem with Outlook Express.

    Using Outlook Express. OS is XP Home with all updates. Most of the e-mails from the last month and this month are no longer visible. New emails do not display but increment the counter of messaging Inbox and set off the musical chime. This should be corrected in order to see the emails currently "hidden"? I will try to check my email using a different machine.

    First: discover | Current view. Make sure Show all Messages is enabled. If this is the case, you are probably pushing OE beyond its limits.

    1: do not archive mail in the receipt or sent items box. Create your own user-defined folders and move messages you want to put in them. Empty the deleted items folder daily. Although the dbx files have a theoretical capacity of 2 GB, I recommend all a 300 MB max for less risk of corruption.

    Information on the maximum size of the .dbx files that are used by Outlook Express:
    http://support.Microsoft.com/?kbid=903095

    2: after you're done, followed by compacting your folders manually while working * off * and do it often.

    Click Outlook Express at the top of the the folder tree so no folders are open. Then: File | Work offline (or double-click on work online in the status bar). File | Folder | Compact all folders. Don't touch anything until the compacting is completed.

    3: disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the processors and causes a multitude of problems such as time-outs and account setting changes. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:
    http://www.oehelp.com/OETips.aspx#3

    For some programs, turning it off is not enough. You may need to uninstall and reinstall in custom Mode and remove the analysis when e-mail messages.

  • Problem with LAN Express airport

    Hello

    I recently bought an Apple AirPort Express router and I have several problems using the Ethernet with the most active airport. The thing is with my old router, I could have been connected to the ethernet cable, while at the same time connected with a LAN cable to my Macbook (end of 2015). The old router would have generated a wifi connection, but at the same time, would have enabled internet connection by cable to my Macbook without the active WiFi. People could use WiFi at home, but the Macbook would be connected to the internet by cable (lan cable connected to the router)

    My question is how to turn on a cable connection on my Macbook using the AirPort Express LAN cable, while at the same time, keep WiFi active. Currently, I have the ethernet cable connected to the airport and cable Lan also connected to the airport and the Macbook, but the internet will not work unless the WiFi is active. I would like to turn off the WiFi on the Macbook and always have an internet connection through the LAN cable that is connected between the AirPort Express device and Macbook.

    Thank you

    My question is how to turn on a cable connection on my Macbook using the AirPort Express LAN cable, while at the same time, keep WiFi active.

    Is the Terminal AirPort Express the only router in the current configuration of your network? No matter, what is the brand and model of the modem Internet you have the Express directly connected by Ethernet? ... or is the Express connected by Wi - Fi to the modem?

  • Strange problem with Toshiba Express Media Player on Satellite M115-S3094

    I am facing a strange problem in my Toshiba M115-S3094, which has been pre-installed with Windows XP Media Center edition and which also had the Toshiba Express Media Player.

    I had already done a clean install of Vista on it, and then I decided to go back to XP with my recovery DVDs. I did the same procedures of first installation Express Media Player to backup (that I did when I bought the laptop) and then installing Windows XP DVD de Toshiba Recovery XP.

    The steps included:
    1 deleted recovery Express media player disk partitions
    2. installed express media player
    3 extracted Xp Recovery DVD, by selecting 'Recover without changing the Partitions' (there is no expert mode)

    Everything was fine (i.e. installation)... But now, after the turning off my laptop I press the Express Media Center button, the logo "Express Media Player" appears on the screen after loading of closures of laptop for 5 seconds.

    I tried to open it again and again, but the logo is displayed for 5 seconds and then my laptop stop...

    Laptop works fine when I connect to windows by pressing the power button / stop.

    Can someone help me on this strange question... ?

    Hello

    The whole story is a bit confusing
    First of all, I would like to know if your laptop is already preinstalled with the Media Express Player and if you were able to use it on your laptop in the past.

    Now something about the Express Media Player installation;
    In order to use the media functions Express the Mediaplayer Express Recovery CD must be performed before performing the recovery from the recovery DVD-ROM products.

    In addition, on the HARD drive should at least 150-200 MB of free space available.
    This free space must be on the end of the HARD drive and there must be unallocated. To get these free space on party products 3rd HARD drive should be used as Partitions Magic 8.

    I m not 100% sure that on error ID system badly but maybe it corresponds to the DMI evil information stored on the motherboard. If we're not DMI, you will not be able to reinstall Express Media player using the recovery media express CD.
    In the DMI must be set properly the manufacturing: Toshiba, product name: for example by Satellite M115-S30

    Finally and most importantly, I found this thread useful forum on the Media Express recovery procedure:
    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?MessageID=51801쩙

    Could be useful for you!

  • Am having some problems with Outlook Express 6.0. When I send a message he doesn't leave my Outbox.

    When I send a message that it does not leave my Outbox, says there is an error, but there is no error code, but the message was sent. Checking virus, malware checked and still the same. Someone at - it ideas?

    You have apparent dbx file corruption.
     
    Spend most of your messages out of the Inbox and then create new folders to send and sent items box after having moved the messages you want to save to a local folder that you create.
     
    Tools | Options | Maintenance | Store folder will reveal the location of your Outlook Express files. Note the location and navigate on it in Explorer Windows or, copy and paste in start | Run.
     
    In Windows XP, Win2K & Win2K3 the OE user files (DBX and WAB) are by default marked as hidden. To view these files in Windows Explorer, you must enable Show hidden files and folders under start | Control Panel | Folder Options icon | Opinion, or in Windows Explorer. Tools | Folder options | View.
     
    With OE closed, find the DBX files for the items in the Outbox and sent and delete them.  New ones will be created automatically when you open OE.
     
    After you're done, followed by compacting your folders manually while working * off * and do it often.
     
    Click Outlook Express at the top of the the folder tree so no folders are open. Then: File | Work offline (or double-click on work online in the status bar). File | Folder | Compact all folders. Don't touch anything until the compacting is completed.
     
    General precautions for Outlook Express:
     
    Do not archive mail in the receipt or sent items box. Create your own user-defined folders and move messages you want to put in them. Empty the deleted items folder daily. Although the dbx files have a theoretical capacity of 2 GB, I recommend all a 300 MB max for less risk of corruption.
     
    Information on the maximum size of the .dbx files that are used by Outlook Express:
    http://support.Microsoft.com/?kbid=903095
     
    Disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the CPUs, slows down sending and receiving and causes a multitude of problems such as time-outs, account setting changes and has even been responsible for the loss of messages. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:
    http://www.oehelp.com/OETips.aspx#3 
     
    Why you don't need your anti-virus to scan your email
    http://thundercloud.NET/infoave/tutorials/email-scanning/index.htm
     
    Note that for some AV programs, it may be necessary to uninstall the program and reinstall in custom Mode and uncheck analysis when the option is the result of e-mail messages.
     
    Compact often as specified above.
     
    And backup often.
     
    Outlook Express Quick Backup (OEQB Freeware)
    http://www.oehelp.com/OEBackup/default.aspx 
  • problem with outllok express with transfer and you reply to emails

    When I try to transfer or respond to emails from my outlook express says its does not work, but it really is. everyone knows about this problem?

    Create a new box of sent, and sent items. If still no joy, try a new identity. Display error message if no work.
    *****************************************************
     
    You have apparent dbx file corruption.
     
    Spend most of your messages out of the Inbox and then create new folders to send and sent items box after having moved the messages you want to save to a local folder that you create.
     
    Tools | Options | Maintenance | Store folder will reveal the location of your Outlook Express files. Note the location and navigate on it in Explorer Windows or, copy and paste in start | Run.
     
    In Windows XP, the files of user OE (DBX and WAB) are by default marked as hidden. To view these files in Windows Explorer, you must enable Show hidden files and folders under start | Control Panel | Folder Options icon | Opinion, or in Windows Explorer. Tools | Folder options | View.
     
    With OE closed, find the DBX files for the items in the Outbox and sent and delete them.  New ones will be created automatically when you open OE.
     
    After you're done, followed by compacting your folders manually while working * off * and do it often.
     
    Click Outlook Express at the top of the the folder tree so no folders are open. Then: File | Work offline (or double-click on work online in the status bar). File | Folder | Compact all folders. Don't touch anything until the compacting is completed.
     
    *************************************************************************
    You may have a damaged identity especially if it's the default main identity. File | Identities | Add the new identity. Create a new one and try it. If all goes well, you can import your messages and address book from the old identity and delete it.
     
    Note: Do not use the main word in the name of the new identity.

    ******************************************************************************
     
     
    General precautions for Outlook Express:
     
    Do not archive mail in the receipt or sent items box. Create your own user-defined folders and move messages you want to put in them. Empty the deleted items folder daily. Although the dbx files have a theoretical capacity of 2 GB, I recommend all a 300 MB max for less risk of corruption.
     
    Information on the maximum size of the .dbx files that are used by Outlook Express:
    http://support.Microsoft.com/?kbid=903095
     
    Disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the CPUs, slows down sending and receiving and causes a multitude of problems such as time-outs, account setting changes and has even been responsible for the loss of messages. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:
    http://www.oehelp.com/OETips.aspx#3 
     
    Why you don't need your anti-virus to scan your email

    http://thundercloud.NET/infoave/tutorials/email-scanning/index.htm
     
    Note that for some AV programs, it may be necessary to uninstall the program and reinstall in custom Mode and uncheck analysis when the option is the result of e-mail messages.
     
    Compact often as specified above.
     
    And backup often.
     
    Outlook Express Quick Backup (OEQB Freeware)
    http://www.oehelp.com/OEBackup/default.aspx 
  • Problems with outlook express, do not receive or send,

    Problem 1: receive error host 'pop.gmail.com' messages could not be found. Check the name of the server. server pop.gmail.com protocol POP3, port 995, secure Yes (SSL), socket error 11001 error # ox 800CCCoD and smtp.gmail.com, port 465 SMTP Protocol, secure SSL, 11001 socket error, error # 0x800CCCoD, firewall does not help send work. Internet explorer opens to the home page, click Favorites or another message search gets can not display the page, internet Explorer only works in safe mode. I ran several different viruses, antimalware programs that so-called and correction. I got to the point where they come back with 0 errors. Have a single program of virus on the system right now. Windows XP Edition family, internet explorer, version 8. Previously a number of computer virus and spyware. Hope that those who are eliminated.  He had spyware who have attempted to enter the passwords, credit card information above. Now outlook express opens with the sign - in window request access code. Never had to do before. The user does not remember the original codes.

    Problem 2:

    Another problem existed before the problem mentioned above: 2 computer user, has clearwire.net for internet service.

    This user 2 uses a computer with an internet connection Wireless USB should be unplugged and reconnected every time they restart windows.

    Another computer, # 1, in their home network uses also a linksys USB to connect to clearwire wireless adapter and this computer should not be plugged and unplugged to connect to the internet.

    y at - it a simple way to solve this problem for daily hassle for the user of the computer 2 so they don't have to unplug & plug in the wireless USB adapter.

    Thank you much for the help

    What on earth does Internet Explorer have to do with sending & receiving mail in Outlook Express? It is not at all related.
     
    1: enable POP in your Gmail account:
    http://mail.Google.com/support/bin/answer.py?answer=13273
     
    2: configuration of your e-mail to Gmail client: Outlook Express and Outlook 2002:
    http://mail.Google.com/support/bin/answer.py?answer=13276&topic=1556 
     
    Configure your Outlook Express client to work with Gmail:
    http://mail.Google.com/support/bin/answer.py?answer=76147
  • problems with Outlook Express email

    Today, I went to open my email and noticed that recent emails that were in my Inbox disappeared.  I also tried to show the old emails not open and he said: Message has not been downloaded

    Outlook Express has not yet downloaded this message.

    To download the message:

    • Click here.
    • Press space.

    Why is deleting emails and why can't see beyond the unopened emails?

    Two reasons the most common for what you describe is disruption of the compacting process, (never touch anything until it's finished), or bloated folders. More about that below.

    Why OE insists on compacting folders when I close it? :
    http://www.insideoe.com/FAQs/why.htm#compact
     
    Why mail disappears:
    http://www.insideoe.com/problems/bugs.htm#mailgone

    Recovery methods:

    If you use XP/SP2 or SP3, and are fully patched, then you should have a backup of your dbx files in the Recycle Bin (or possibly the message store), copied as bak files.

    To restore a folder bak on the message store folder, first find the location of the message store.

    Tools | Options | Maintenance | Store folder will reveal the location of your Outlook Express files. Note the location and navigate on it in Explorer Windows or, copy and paste in start | Run.

    In Windows XP, the .dbx files are by default marked as hidden. To view these files in the Solution Explorer, you must enable Show hidden files and folders under start | Control Panel | Folder options | View.

    Close OE and in Windows Explorer, click on the dbx to the file missing or empty file, then drag it to the desktop. It can be deleted later once you have successfully restored the bak file. Minimize the message store.

    Open OE and, if the folder is missing, create a folder with the * exact * same name as the bak file you want to restore but without the .bak. For example: If the file is Saved.bak, the new folder should be named saved. Open the new folder, and then close OE. If the folder is there, but just empty, continue to the next step.

    First of all, check if there is a bak file already in the message. If there is, and you have removed the dbx file, go ahead and rename it in dbx.

    If it is not already in the message, open the trash and do a right-click on the file bak for the folder in question and click on restore. Open the message store up and replace the .bak by .dbx file extension. Close the message store and open OE. Messages must be in the folder.

    If messages are restored successfully, you can go ahead and delete the old dbx file that you moved to the desktop.
     
    If you have not then bak copies of your dbx files in the Recycle Bin:

    DBXpress run in extract disc Mode is the best chance to recover messages:
    http://www.oehelp.com/DBXpress/default.aspx

    And see:
    http://www.oehelp.com/OETips.aspx#4

    A general warning to help avoid this in the future:

    Do not archive mail in default OE folders. They finally are damaged. Create your own folders defined by the user for mail storage and move your mail to them. Empty the deleted items folder regularly. Keep user created folders under 300 MB, and also empty as is possible to default folders.

    Disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the CPUs, slows down sending and receiving and causes a multitude of problems such as time-outs, account setting changes and has even been responsible for the loss of messages. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:
    http://www.oehelp.com/OETips.aspx#3

    And backup often.

    Outlook Express Quick Backup (OEQB Freeware)
    http://www.oehelp.com/OEBackup/default.aspx

Maybe you are looking for