query: both sides of the equation cannot be zero: left = right

I have that table t defined below. In the column 'T.VAL', I have null values and string values. I have variable input ": i_val" which with I have a query "T.VAL" column as follows:
(1) if: i_val = null, then return folder where VAL is null (ID = 1)
(2) if: i_val = 'a', then return save where VAL = 'a' (ID = 2).

How to write this query, the best way?

Note that this query below is incorrect:
with T as
(select 1 ID, null VAL from dual
union all
select 2 ID, 'a' VAL from dual
union all
select 3 ID, 'empty' VAL from dual)
select * from T
where nvl(T.VAL, 'empty') = nvl(:i_val, 'empty');
If an entry is i_val = null, then it returns
1     null
3     empty
It's false, he must return only one record with ID = 1 in this case.

Published by: CharlesRoos on April 16, 2010 03:53
SELECT *
  FROM T
 WHERE (t.val IS NULL AND :i_val IS NULL) OR(T.VAL = :i_val);

URS

Tags: Database

Similar Questions

  • HP LaserJet P1102 cannot print both sides of the paper

    I updated my Windows 8 Windows 8.1 and now I can't print both sides of the paper.

    In my old Windows 8 my printer HP LaserJet P1102 printed the odd sides of the document, then a pop-up window appears and when I click on the 'next' botton and submit the documents to the printer printed the sides of the document. After that the Windows update in the context menu does not appear, so the printer simply prints the odd sides and then nothing happens (just the red flashing on the printer).

    I tried to update the driver (downloaded from your site), but nothing has changed.

    I hope that you can add some useful tips and I can solve this huge problem.

    Thank you!

    Hello

    I understand that you can print is more on both sides.

    When the light flashes try and open and close the lid to see if continues to print.

    (there is no button for the printer but which will resume print jobs)

    I would do a complete uninstall and reinstall the printer software to see if that makes a difference.
    You can download the drivers from this url.

    http://h10025.www1.HP.com/ewfrf/wc/softwareCategory?cc=us&DLC=en&lang=en&LC=en&product=4110396&

    Win8 and Win8.1 drivers are the same Version9.0.

    If you need more simply make assistance let me know.

    Please let me know if the printer is connected by usb or the installer on a wireless network.

  • HP officejet 4630 will not print on both sides of the paper

    Unable to print on both sides of the paper. The backsideprints first, then wait for the ink to dry, front end starts to print then stops with a windows error message popping up on the screen saying cannot print the document.

    I found that I can't print multiple pages either. For example, I decided to print the document of 4 pages in the form of simple pages only (since double-sided would not work) and the results were first page print second page prints on a third, and then just stop with error message this printer cannot print the pdf document. If I had to select each separately page to finnally get all four printed pages. HP print and scan diagnosis says theres no problem. Windows diagnostics says there is no problem.

    Obviously there is a problem can offer advice and the solution?

    Thank you

    Kimoho

    To all,

    Thanks a lot for your suggestions. I would like to point out that the problem was solved and printer works fine.

    The solution is one of the two things?

    First, I opened the windows firewall and allows all applications and processes to pass through. There may be a few dozens of them, some have been verified and how some have been blocked. I checked all except those who started with 'remote '.

    Second, I went on the printer software and returned the IP address of the printer. It was the same as the IP address, but somewhere on the microsoft blog, I read that windows and routers sometimes lost the IP address. That's why I'm re-entered.

    I don't know which of these fixed the issue, but one of them did.

    Thanks again

    Kimoho

  • You can open the same app twice for both sides of the screen on iPad pro?

    I want to open the application even for both sides of the split screen.  Is this possible?

    No, this isn't a feature of iOS.

  • Scanning both sides of the Mac procedure please

    Hello, I bought a MFP HP LaserJet PRO M477fdw.

    Scanning on one side is OK but the printer is supposed to be able to do duplex scanning. I is not this function in the system preference--> printer & Scanner. In HP Easy Scan, there is a duplex option, but even I've chosen, hit the scan button on the side as a single scanned computer. Someone knows how to scan both sides at the same time?

    Please try scanning with HP Easy Scan by doing the following:

    Open HP Easy Scan and then open the menu Presets in the presets menu, define the type of Document and the source as document feeder, then check the box to scan both sides.

    Kind regards

    Shlomi

  • How can I create my own template pages, to print a 4-page newsletter on both sides of the tabloid-size paper?

    How can I create my own template pages, to print a 4-page newsletter, using both sides of the tabloid-size paper?

    The finished newsletter should be a folded booklet: a piece of 11 x 17 paper folded to form a 8.5x11 "booklet". This clearly means pages 1 and 4 should be printed on one side of the tabloid sheet and pages 2 & 3 on the other.

    I can't find such a model in the Pages.

    There is no such a model, so you'll have to make your own, using a spread on presentation of your newsletter.

    Use shapes, images and text boxes to position available for your model.

    You didn't say what version of Pages that you are using but if it's Pages 5.x, it has no text boxes related so this will make it difficult and it's going to be a lot of manual work.

    Peter

  • Print on both sides of the page

    For printing on both sides of the page, the instructions say to FLIP on LONG EDGE or RETURN on SHORT EDGE.   WHAT WOULD BE THE CRITERIA FOR THE REVERSAL OF ONE WAY OR THE OTHER?  I'm printing docs on 8-1/2 x 11 paper. 1 set of docs is 14 unique pages that I could turn it into 7 if I could print on both sides.

    Instructions more tell - printer is will automatically load the back paper to print on the other side. Someone please help me understand these instructions?  Thank you.  Judy

    > to FLIP on LONG EDGE or RETURN on SHORT EDGE.

    This difference is important if you want to print portrait vs landscape.

    For the first case, you usually run flip on the long side, on the side.

  • HP Deskjet 1000 J110 series how to print on both sides of the paper and staple Yes to change?

    HP Deskjet 1000 J110 series how to print on both sides of the paper and staple Yes to change?  I looked everywhere I can think of. You are my last resort.

    Windows 7 ~ 64-bit

    Hello

    Unfortunately, this printer does NOT support duplexing (printing on both sides):

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

    Kind regards.

  • ENVY 120 CZ022B: How to print a word document on both sides of the page (MAC)

    How to print a word document on both sides of the page (MAC) I can´t find how do!

    Hello
    Follow these steps to automatically print double-sided in Word print jobs:

    In the file being used to print click the file menu and select print.
    NOTE: The print window might be minimized. Press show details to show all available print option.

    Click Copy Pages & drop doen and select layout.

    Set the duplex option as the binding edge (Portrait) Long or short edge (landscape) bond.

    You can save the settings for later use by clicking preset > save current settings as preset. By default, a used preset will remain until another preset will be used.

    Kind regards
    Shlomi

  • two face automatic printing both sides of the page, does not work. Why?

    I have a printer with auto print both sides of the page. It does not work. Why?

    Some printers require a separate duplex adapter must be installed in the printer. He might be able, but the part is missing. Additionally, make sure that you use the printer drivers printer manufacturers, not those provided with Windows.

    Is what printer model?

  • How to create a document and insert the words and/or art on both sides of the page

    How to create a document and insert the words and/or art on both sides of the page

    How to create a document and insert the words and/or art on both sides of the page

    You create a document by using an application of word processor like Microsoft Word or Corel WordPerfect or OpenOffice Writer.  Think of it as a broad a page roll.

    When you print the document, you can print all pages of the document on one sheet of paper (the normal default value), or you can print on both sides of a sheet of paper.

    Some printers are capable of automatic double-sided printing.  With others, you print all the odd pages and then take the stack of paper, turn upside down and put it back into the printer to print all pages.  You need either to read your printer manual, or experiment a bit to determine if you need to re - organize the first last pages before printing the second side.

  • HP print printable using both sides of the sheet

    I would like to be able to take advantage of the ability of the printer to print on both sides of the paper.  When I print from my computer, it is not a problem.  However, when I set up the automatic broadcast of an ePrint application (Comics, for example), the print is only on one side.

    Does anyone know how to set up connected HP Print Center to use both sides of the paper?

    -mgg4

    Hi Mgg4,

    I see you are trying to print two-sided when you use printable Hp.

    Currently, the duplex printing option is not available for Hp Printables(ePrint apps).

  • How to print on both sides of the paper with deskjet 9800

    Hello

    I'm trying to print on both sides of the paper.  I have a deskjet 9800.  I select two sided, but it will print one page after another.  Even pages are 'upside down '.

    Would appreciate help with this.

    Hello

    I think that it is an old printer and it MUST have a duplex unit to be able to print both side automatically if yu have to print manually (turn inside papers yourself):

    http://h20565.www2.HP.com/portal/site/hpsc/template.page/public/KB/docDisplay?docid=c00283626&AC.admitted=1414613820848.876444892.492883150

    Kind regards.

  • Printing one or both sides of the paper

    I have a new Officejet 6500 has more all-in-one printer with the ability to print on both sides of the paper.  It is configured to print on both sides right now, and I want to be able to change the setting for single side or double side easily, if needed, but I can't find instructions on how to do it.  I tried clicking on 'options', 'preferences', 'properties' etc etc but nothing seems to give me the option to select single or double sided.  How can I do?  Advice please.

    Thanks Bob.  I already found a solution - there is a drop down window below the line in preferences menu that says "print on both sides", and if you select 'none', it gives unique back.  Not really intuitive, but I was given this information by another computer geek and it works!  Thanks for getting back to me well.

  • How can I print on both sides of the software adobe reader on my mac

    I wanted to print on both sides of the software adobe reader on my mac he give me the ability to print directly from a file loaded down with an email

    I tried to print another document infact a page of e-mail, he gave me a double option face why can't print with adobe reader software?

    Hi dianah71252428,

    Adobe Reader and Adobe Acrobat allow you to print double-sided if your printer supports this feature. The printer driver controls the options, not Adobe Acrobat or Adobe Reader. Check your printer documentation to see what features your printer supports. (Double-sided printing is also called duplex, back to back, front and back, or double-sided printing).

    Refer to this KB document for help double-sided printing. Adobe Acrobat, Reader

    Kind regards
    Nicos

Maybe you are looking for

  • Family Vista premium will not allow access the USB on HP All in One Printer L7580.

    Other laptops using XPPro have no problem. I get the message when I try to access "HP Officejet Pro L7500 series ( \\HP0017a425d4e0\memory_card ) Message "Z:\is not accessible. The handle is invalid. » Printer works as a printer. Printer is connected

  • Satellite L10-273: WLan button FN + F8 does not work

    Hello I have a laptop of L10 - 273 and have recently received broadband services. It came with a Netgear router which is set up and works well, but to use broadband do I need to use the ethernet cable. However, the wireless button on the front of my

  • HP G62-b90SP - hardware upgrade

    Hello, I have a few questions about my laptop HP G62-b90SP Windows OS 8.1 Pro x 64. I want to improve my Intel Core processor i5 M460 @ 2.53 GHz to an i7 and my 2 to 2 x 4 GB 2x2gb ram slots that I've read that my laptop allows up to 8 gb. The proble

  • 5540: Instant ink

    I got my new printer yesterday, and only 31 pages a4, its now say its out of ink. I am a member of ink instant on the 300 pages per month But as I've only had my printer yesterday (Friday) not much so good already missed How long I'm going to get my

  • To enable IIS controll password in the IIS 5.1 Document Security tab?

    Why when I uncheck the IIS allow to control password and enter my password and confirm it, then I go into my Web browser is not asking for a user and pass I provided under the Security tab of Document in spite that integrated Windows authentication i