results on the query with filter, but no results when the filter removed

I was handed the query below and I may be missing something blinding here but if I run it I get no results

SELECT lipqoh
OF f41021 a, b f0006
WHERE b.mcmcu = a.limcu AND
b.mcstyl = "W";

If I add the filter a.liitm = 105900 as data below is returned (although the inputs are 0 as expected at the moment, this isn't always the case)

SELECT lipqoh
OF f41021 a, b f0006
WHERE b.mcmcu = a.limcu AND
b.mcstyl = 'W '.
a.liitm = 105900;

the fields for each of the tables mentioned in the motion have the following features

lipqoh number NULLABLE
mcmcu Char(12 BYTE) NOT NULLABLE
mcstyl tank (2 BYTE) NULLABLE
liitm number NO NULLABLE

Any guidance would be greatly appreciated

Thank you for providing feedback. The only difference seems to come from the mcstyl columns.
The following snipplet perhaps explain how this expression may be true or not true according to the data types.

select * from dual
where 'W ' = cast('W' as char(2 byte));

DUMMY
-----
X

select *  from dual
where cast('W ' as varchar2(2 byte)) =  'W';

no rows found

This statement returns all rows?

SELECT lipqoh
FROM f41021 a , f0006 b
WHERE b.mcmcu = a.limcu
AND   b.mcstyl = 'W '; /* blank added */

I expect so. I still don't understand why oracle treats differently the two queries. However I do not have an adequate control environment. Your version is simply a bit outdated (no longer supported). And I know that some of the type conversion rules had been changed between 9i and 10g.

Published by: Sven w. on March 30, 2010 15:15

Tags: Database

Similar Questions

  • Audio works with headphones, but not the speakers

    Hello, I have a DELL XPS17.  The sound works fine with headphones, but no sound when the headphones are disconnected.

    Note that I had the opposite problem (its good speaker, but no helmet) and then updated the driver.  Once the new driver has been installed, the problem was reversed.  Very strange: Pei

    Last driver installed is Audio_RLTK_W7_A05_Setup-J3VMR_ZPE

    Thanks for your help!

    Hello. You can test your speakers by running test audio fast ePSA or PSA tests.

    You can test the audio driver by opting for the native Windows audio driver. If you get the same symptoms with the native driver, then you can exclude a bug in the driver from Realtek. This Realtek driver has been around for awhile now and has no bugs that I know.

    • 1. open Device Manager (found in the Control Panel, or type devmgmt.msc in the search box).
    • 2. develop the 'audio controllers, video & game' and right click on "Realtek High Definition Audio".
    • 3 Select this option to "Update driver software".
    • 4. click on "Browse my computer for driver software".
    • 5. click on "Let Me pick from a list of drivers on my computer".
    • 6. put the "Show compatible hardware" check box if not already checked.
    • 7. in the list of devices, click on 'High Definition Audio"(native driver).
    • 8. click on "next".
    • 9. in the update driver warning box, click 'Yes' (the driver).
    • 10 restart the portable computer if you are prompted. If not invited, so no need to restart.
    • [To return to the Realtek driver, do it again but reverse steps 2-7 names].

    If the speakers and the driver to pass the tests, you might have failed to sense pin into the headphones Jack, explained in the FAQ of Jack for headphones.

  • How to transpose the query with the following result

    Dear all,

    Can someone tell me a method to convert my query result

    Details are provided in

    http://obiee11ge.blogspot.com/2010/07/how-to-transpose-query-with-following.html

    Concerning

    Mustafa

    Hello

    Try this
    Create a request combined with,

    criterion no. 1: model, revenue (Actual), Cogs (Actual), Opex (Actual), PL (Actual)

    in the dummy column fx enter the "Real" value

    criterion 2: model, revenue (Yago), Cogs (YAgo), Opex (Yago), PL (Yago)

    in the dummy column fx enter the value as "Yago".

    criterion 3: model, revenue (Budget), Cogs (Budget), Opex (Budget), PL (Budget)

    in the dummy column fx enter the value as 'Budget '.

    Now go to the columns of result and set names coumn (revenue, COGS, Opex, PL) for the result set.
    For the Dumny, remove column header.

    In a sheet view, you will get the result.

    Thank you
    Vino

  • Rewrite the query with joins, and group by

    Hello

    It's an interview question.

    Table names: bookshelf_checkout
    virtual library

    And the join condition between these two tables is title

    We need to rewrite under request without using the join condition and group by clause?

    SELECT b.title,max(bc.returned_date - bc.checkout_date) "Most Days Out"
               FROM bookshelf_checkout bc,bookshelf b
               WHERE bc.title(+)=b.title
               GROUP BY b.title;
    When I was in College, I read most of SELECT statements can be replaced by operations base SQL (DEFINE the OPERATORS). Now, I am rewriting the query with SET operators, but not able to get the exact result.

    Kindly help me on this.

    Thank you
    Suri

    Something like that?

      1  WITH books AS (
      2  SELECT 'title 1' title FROM dual UNION ALL
      3  SELECT 'title 2' FROM dual UNION ALL
      4  SELECT 'title 3' FROM dual ),
      5  bookshelf AS (
      6  SELECT 'title 1' title, DATE '2012-05-01' checkout_date, DATE '2012-05-15' returned_date FROM dual UNION ALL
      7  SELECT 'title 1' title, DATE '2012-05-16' checkout_date, DATE '2012-05-20' returned_date FROM dual UNION ALL
      8  SELECT 'title 2' title, DATE '2012-04-01' checkout_date, DATE '2012-05-15' returned_date FROM dual )
      9  SELECT bs.title, MAX(bs.returned_date - bs.checkout_date) OVER (PARTITION BY title) FROM bookshelf bs
     10  UNION
     11  (SELECT b.title, NULL FROM books b
     12  MINUS
     13* SELECT bs.title, NULL FROM bookshelf bs)
    SQL> /
    
    TITLE   MAX(BS.RETURNED_DATE-BS.CHECKOUT_DATE)OVER(PARTITIONBYTITLE)
    ------- ------------------------------------------------------------
    title 1                                                           14
    title 2                                                           44
    title 3
    

    Lukasz

  • quickly create with filter-date and initialize it with the current date

    Oracle BI 11 g

    Hello!

    I need to create guest of dashboard with filter-date and initialize it with the current date. How can I do?

    I tried to create the repository initialization block and add a variable. But I don't know what should I write to DataSource? I tried using the Current_Date, Now(), sysdate functions (for example, SELECT Now() FROM tbl_Calendar) but without results - when I pressed the button "Test"... "I have errors - something like 'Now() is unknown function' or 'incorrect syntax near keyword Current_Date.

    After that, I made to use presentation Variable in the command prompt, but also without success (())

    Please, help me.

    Use "Server Variable.

  • How can I create a query with the data control to the web service?

    I need to create a query with the order of web service data, WSDL, it is query operation, there is a message of parameter with possible query criteria and a return message contains the results. I googled but can't find anything on the query with the web service. I can't find a criterion "named" to the data control of web service as normal data control. Blog of Shay, I saw the topics on the update with the data of web service command. How can I create a query with the data control to the web service? Thank you.

    Hello

    This might help

    * 054.     Search form using control data WS ADF and complex of entry types *.

    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/index-101235.html

  • Select the query with the level line list where the clause

    Hi all

    I am creating a tabular presentation based on a SQL query that has a list of selection based on a query with a where clause clause that refers to a column in the original SQL query.

    The situation is, I have a table that stores the client_id, source_id, and build_id, lets call it client_source. I have a second table, build_source, containing source_id and build_id, one to many relations between the two (1 source_id could have build_id 1-7).

    Using a tabular presentation, I want to select the correspondent build_id to use in client_source, but the selection list should contain only the build_id for this particular source_id of lines.

    Here is an example of the SQL source of tabular presentation;

    Select
    s.ROWID,
    s.CLIENT_ID,
    s.SOURCE_ID,
    APEX_ITEM. SELECT_LIST_FROM_QUERY (1, s.BUILD_ID,)
    "Select display b.build_id, b.build_id return.
    b build_source where b.source_id = s.SOURCE_ID ') lst
    of s client_source

    what I want to achieve, it's as source_id "BOLD" match fields. When the query is built this way, I get an error of "invalid identifier" Oracle on s.SOURCE_ID during execution.

    Is there some special tags to be used to refer to the external column? I must be missing something because this looks like a pretty mundane problem.

    I am running on 4.1.0.00.32, on an Oracle 10 g release 10.2.0.4.0 Server Express request.


    I look forward to useful responses!


    See you soon,.
    Jason

    Published by: 1005131 on May 9, 2013 19:02

    Your selection by query list receives a static SQL. That SQL can't "see" the value of your s.source_id.
    But it would work like this:
    where b.source_id = ' | s.SOURCE_ID)

    You would be the value for the SQL concatenation. It is not ideal, but it will work.

    Jorge

  • A simple query with as wrong return result

    Hello

    I run a simple query with like.
    If I use the parameter I get incorrect results.
    If I use the request without parameter results are ok.

    My script:

    ALTER SESSION SET NLS_SORT = BINARY_CI;
    ALTER SESSION SET NLS_COMP = LINGUISTIC;

    -drop table abcd;
    create table abcd (col1 varchar2 (10));

    INSERT INTO VALUES ABCD ('122222');
    insert into abcd values ('111222');


    SELECT * FROM ABCD WHERE COL1 LIKE: 1. -bad result with 12%
    /*
    COL1
    ----------
    122222
    * 111222 *.
    */

    "Select * ABCD where col1 like 12%; -result ok
    /*
    COL1
    ----------
    122222
    */

    I use Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
    and query, run in Oracle SQL Developer 3.1.07.

    I think it's just a bug, and it is set to 11.2.0.3:

    11.2.0.1:

    DB11.2.0.1>> select * from v$version where rownum=1;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    
    1 row selected.
    
    DB11.2.0.1>> ALTER SESSION SET NLS_SORT=BINARY_CI;
    
    Session altered.
    
    DB11.2.0.1>> ALTER SESSION SET NLS_COMP=LINGUISTIC;
    
    Session altered.
    
    DB11.2.0.1>> create table abcd (col1 varchar2(10));
    
    Table created.
    
    DB11.2.0.1>> INSERT INTO ABCD VALUES ('122222');
    
    1 row created.
    
    DB11.2.0.1>> insert into abcd values ('111222');
    
    1 row created.
    
    DB11.2.0.1>> VARIABLE A1 VARCHAR2(10);
    DB11.2.0.1>> EXEC :A1 := '12%';
    
    PL/SQL procedure successfully completed.
    
    DB11.2.0.1>> SELECT * FROM ABCD WHERE COL1 LIKE :A1;
    
    COL1
    ----------
    122222
    111222
    
    2 rows selected.
    

    11.2.0.3:

    DB11.2.0.3>> select * from v$version where rownum=1;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    
    1 row selected.
    
    DB11.2.0.3>> ALTER SESSION SET NLS_SORT=BINARY_CI;
    
    Session altered.
    
    DB11.2.0.3>> ALTER SESSION SET NLS_COMP=LINGUISTIC;
    
    Session altered.
    
    DB11.2.0.3>> create table abcd (col1 varchar2(10));
    
    Table created.
    
    DB11.2.0.3>> INSERT INTO ABCD VALUES ('122222');
    
    1 row created.
    
    DB11.2.0.3>> insert into abcd values ('111222');
    
    1 row created.
    
    DB11.2.0.3>> VARIABLE A1 VARCHAR2(10);
    DB11.2.0.3>> EXEC :A1 := '12%';
    
    PL/SQL procedure successfully completed.
    
    DB11.2.0.3>> SELECT * FROM ABCD WHERE COL1 LIKE :A1;
    
    COL1
    ----------
    122222
    
    1 row selected.
    

    Kind regards
    Sayan Malakshinov
    http://orasql.org

  • I can't delete a game called Float that gives the message waiting. The cross and the oscillation with delete option appear, but it won't when I select Remove. Any ideas please?

    I have a new mini iPad 4. I can't delete a game called Float that gives the message waiting. The cross and the oscillation with delete option appear, but it won't when I select Remove. I don't know how it came to be. Any ideas please? Thank you.

    First try a reset to see if it finishes downloading. Press and hold the home and power buttons until the Apple logo appears. Release the two buttons. Wait until the iPad tour starts on its own.

    Check if you can remove the application. If not go into settings > general > use iCloud and storage > storage > storage management. Wait for the list of apps to open. See if the float is on the list. If it is delete it from there.

  • the site theme is problem with firefox, but not any problem of chrome with!

    the site theme is problem with firefox, but not any problem of chrome with!
    for ex: http://haftegy.ir
    How to fix?

    Wow sorry! IM update firefox to the latest version and my problem is solved.
    Thank you very much.

  • I can go on the internet with firefox, but firefox does not open my comcast email.

    I have a Mac. I can get on my e-mail with Safari but not Firefox. Firefox is my favorite. My Firefox is updated to 30.0. I can access internet, but when click on my email address it will never connect. I don't get an error message, it will never connect. I stopped and restarted. I entered in 'Préférences' and deleted my cookies and cleared the cache. I have not been able to access my email on Firefox since last week.

    Hello

    Try Firefox Safe mode to see if the problem goes away. Firefox Safe mode is a troubleshooting mode that disables certain parameters, disables most Add-ons (extensions and themes).

    If Firefox is open, you can restart Firefox Safe mode in the Help menu:

    • In Firefox 29,0 and above, click on the menu button

      click Help

      then select restart with disabled modules.

    • In previous versions of Firefox, click on the Firefox button in the upper left of the Firefox window and click help (or click on help in the Menu bar, if you do not have a Firefox button) and click on restart with disabled modules.

    If Firefox is not running, you can start Firefox in Mode safe mode as follows:

    • On Windows: Hold down the SHIFT key when you open the desktop Firefox or shortcut in the start menu.
    • On Mac: Hold the option key during the startup of Firefox.
    • On Linux: Exit Firefox, go to your Terminal and run firefox-safe-mode
      (you may need to specify the installation path of Firefox for example/usr/lib/firefox)

    When the Firefox Safe Mode window appears, select "start mode safe."

    If the issue is not present in Firefox Safe Mode, your problem is probably caused by an extension, and you need to understand that one. Please follow the section Troubleshooting extensions, themes and problems of hardware acceleration to resolve common Firefox problems to find the cause.

    To exit safe mode of Firefox, simply close Firefox and wait a few seconds before you open Firefox for normal use again.

    When find you what is causing your problems, please let us know. This might help others with the same problem.

  • In our site web the kind of product order under our categories are random with Firefox, but IE, Chrome is fine, any ideas?

    The sort order of products under our categories on our website is random with Firefox, but the categories of products are in the correct order with IE, Chrome, etc.. This incorrect order occurs on different computers, e.g. Firefox, Windows 7, XP, etc. and not is not compliant. To make matters worse, sometimes it is random with Firefox and return then to be sorted correctly, but IE, Chrome, etc. are always in the correct order.

    I get the blue beauty first when I specify 'Default' sort order and blue Gigantea first when I specify 'Low price' sort order. This seems to be implemented using a cookie so that if I reload the page, the order is not reset to the default value.

    Edit: However, if I close the tab and open the link again, it reverts to the default.

  • sync the iPhone with iTunes but even different ical and contacts

    I would like to sync an iPhone to my mac, my wife and I share. Is it possible that I can connect on the same iTunes account to share our music, but keep our calendars, photos and contacts separate?  Currently, I have my own user account on the computer and I sync with iTunes, but it is not any music. If I put his music library in a shared folder that I have access on the two user accounts, can I delete everything on my phone to sync with the new iTunes library? I wouldn't delete all my apps and everything. Is there a better way to go about this? If it's important, we do not add music to our iTunes so it could be acceptable only for copying all music files once if it was the best way to ensure the rest of our things remain separated. Thanks for your help!

    Use the family sharing, as described here:

    Family shares - Apple Support

  • I have the most recent edition of the Flash Player and it works fine with IE, but Firefox always tells me that I can play things because I have

    Since I updated Firefox I can't play anything that requires Flash player. I have the reader up-to-date and it works perfectly with IE, but Firefox always tells me that I need another plugin and when I followed the instructions, it says "failed download try manual download" but even that fails too.
    Before I updated Firefox I had no problem, can you help me
    Alan.

    al55:

    Using Windows 7 64-bit or 32 - bit OS?

    Firefox is a 32-bit application. Try to (1) download the 32-bit Setup program, save it to your hard drive, (2) close all browsers, (3) run the program installation and (4) test.

    After installation

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

  • I get e-mail with pictures, but the pictures do not show I get a gray box

    I get e-mails with pictures but the pictures do not show that only receive a box grey.

    What should I do to get photos with photo comments?

    Hello

    1 are you faced with the question in the client program, e-mail or webmail?
    2 are you facing issue with a particular Email or all emails containing photos?

    Please follow the link:

    Images are not displayed and a red X may appear on Web sites in Internet Explorer:
    http://support.Microsoft.com/kb/283807

    I hope this helps.

Maybe you are looking for

  • check the possibility of restoration

    I made an image with Windows 7 backup, but when I tried to restore the image, the backup has failed. Is it possible to check if the backup will work to restore off likely to erase the hard drive. ? There is no security by having a backup that does no

  • Resolution of the webcam problems

    Hi all I finally decided me coming here on a resolution of the webcam problem: since Skype updates that followed the 6.2 version, I can't simply a resolution on my bodily proportions. In other words, I think that Skype automatically assigns to a reso

  • Front Position Confusion

    In my program, I have several graphic wavefrom; I would call a reentrant Subvi, dialog is to say little, what "appears" on each chart, see attached picture. I would like to define dynamically position the dialog box must match the waveform card. Howe

  • Why my WordPad doesn't document hyperlink my URL?

    Why don't the Word Pad (.rtf) document on the laptop of my husband (which I am using now) hyperlink my URL? The Word Pad document on my own laptop IS hyperlink my URL. So, I know it's possible.

  • Once I turned on the computer I got the following message: Windows could not start because the following file is missing or damaged. System32\Drivers\Ntfs.sys

    I just download Microsoft Office 2010 Professional and then turns off the computer with XP operating system. Once I turned on the computer I got the following message: Windows could not start because the following file is missing or damaged; System32