Problem with the simple query.

Hi all

I am facing problem with the query below

Select A.COL1, A.COL2

B.COL1, B.COL2

FROM TABLE1 A

TABLE 1 B

WHERE A.header = '123'

AND B.header = '123'

AND nvl (A.COL6, 'ABC') = 'ABC '.

AND NVL (B.COL6, 'DEF') = 'DEF '.

Basically, my requiremenyt is: I have only one table, TABLE1 here, which has a line two lines (for the same header) as "ABC" and another is "DEF". Table 1 has two columns (col1, col2) that should be displayed for both lines.

When the header has two records in table1 top query works. and but if I do not have a record for any header example there are a record for "abc" in col6 only. so my query above does not work because there is no record for 'DEF' in col6. But I want to again request to fecth the output (for b.col1 and b.col2 should have null values)

could you pls suggest me how to get the 4 columns.

Thanks in advance

Kind regards

UVA.

Try to place the status of outer join on column: analytical_criterion_code as

and nvl (AUDIT.analytical_criterion_code, 'AUDIT2') = 'verification2. '

.

.

and nvl (TRANS.analytical_criterion_code, 'TRANS2') = 'TRANS2.

In the sub query based on the opinions that you have given in post # 1, although there is no value "DEF * ' for col6 due to the condition of outer join on b.col6 (+) line is extracted with b.col [1,2,3] as NULL values. Try to remove the (+) sign b.col6 and test.

with t as)

Select 111 col1, col2 'aaa', 'ABC' col6 123 header of all the double union

Select 222 'bbb', 'DEF' col6, 123 double header

)

q as (select 123 double header)

Select A.COL1, A.COL2, A.COL6

B.COL1, B.COL2, b.COL6

q.header

T a

t b

q

where a.col6 (+) = 'ABC '.

and b.col6 (+) = "DEF."

and q.header = a.header (+)

and q.header = b.header (+)

Tags: Database

Similar Questions

  • Problem with the input query mode. FRM 41009, 40301

    Hi all

    I have a problem with the mode of input query. What can I say, I'm in the mode of input query, and I click on a button. I get the error THAT FRM-41009 displayed.

    Now, I've wanted handled. So I created a trigger of error in order to handle the error.

    IF ERR_CODE = 41009 THEN
    NULL;
    END IF;

    A problem is that when you use the null value, it will not terminate the mode of input query, and then I get frm-40301 error.

    Second, it's that I can't use exit_form in a trigger of the error.

    I am aware that I can press F4 to exit this mode, but I don't want to do whenever I'm sure I'll get the user complaints.

    Another solution would be to put the following code in the trigger when key pressed for each button in the form:

    If: system.mode = "ENTER-QUERY" then
    exit_form;
    end if;

    But I don't want to reproduce this code in my form.

    Please can you give me an idea how to handle this correctly?

    Thank you
    Michael

    PS: Version of the form = > ORACLE FORMS 10g (Forms [32 bit] Version 10.1.2.3.0)

    I have a problem with the mode of input query. What can I say, I'm in the mode of input query, and I click on a button. I get the error THAT FRM-41009 displayed.

    What is the code in the trigger of your button When-Button-Pressed (WBP)? Maybe you should check to see if the form is in the Mode query in your WBP rather than try and remove the error? In other words, eliminate error - do not delete it. :)

    If you want instead to remove the error, there is a technique to built-ins call restricted to a trigger that does not allow them. Do this by the use of a millisecond zero Timer. For example:

    /* Sample On-Error Trigger */
    DECLARE
      n_err_cd   NUMBER := ERROR_CODE;
      t_on_error TIMER;
      ZERO  NUMBER := 0;
    BEGIN
      IF ( n_err_cd = 41009 ) THEN
        /* Create Timer to execute Exit_Form() */
        /* to Cancel Query-Mode. */
        t_timer := Create_Timer('ON_ERROR', ZERO, NO_REPEAT);
      ELSE
        /* Handle all other errors here... */
      END IF;
    END;
    
    /* Sample When-Timer-Expired Trigger */
    DECLARE
      v_Timer  VARCHAR2(30);
    BEGIN
      v_timer := Get_Application_Property(TIMER_NAME);
    
      IF ( v_timer = 'ON_ERROR' ) THEN
        /* Notice, the timer name is case sensative! */
        Exit_Form;
      END IF;
    END; 
    

    I am aware that I can press F4 to exit this mode, but I don't want to do whenever I'm sure I'll get the user complaints.

    Well, it's just standard features of Oracle Forms. If you switch the Mode request form - you must run a query or cancel the query Mode! This is how it works. Your users need to understand that and accept it - just as they accept the functional also for other programs. ;) Another option would be to add a "Cancel request" button to your form and make it so it is enabled only when the form is placed in Query Mode. Just a thought...

    I personally prefer to prevent the occurrence of an error rather than remove the error. :)
    I hope this helps.
    Craig...

  • Lost my copy and I tried to download the iso from the Microsoft web site, but my product key will not validate, pass this message: we had a problem with the validation query

    Original title: error Windows 7 installation files

    I bought a copy of Windows 7 at Tiger Direct on 22/05/2014.  I lost my copy and I tried to download the iso from the Microsoft web site, but my product key is not valid.  I get this error message

    We had a problem with the request for approval.

    FAQ

    See for other directions:

    http://answers.Microsoft.com/en-us/Windows/wiki/Windows_7-update/how-to-what-are-my-options-for-obtaining-Windows-7/528163c1-0b2e-4AD2-a26d-7112851d1dc2

  • Problem with a simple query

    Hello, I'll start by saying that I am a noob. in any case, I'm trying to do what I thought was a simple query for records that are greater or equal to the date of the day: it's my request...

    < cfquery name = "getUpcoming" datasource = 'events' >
    SELECT title, eventDate FROM event WHERE eventDate > = #Now () # ORDER BY ASC eventDate
    < / cfquery >

    It works, so, I get the records that are greater than the current date, but all records that match to are not.

    I guess that it is looking at the time as well, or should I completely wrong. I do not know? Any help would be greatly appreciated.

    Good reading up on top of (http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7f 6f.html), which you must use when you pass dynamic values to the DB, instead of hard-coding the in your SQL string.  And when using , use a param of CF_SQL_DATE type, and must ignore the time portion of the date/time value, you pass (I'm not 100% certain of this... only about 99% certain... but give it a go).  Or spend only the date part of the date/time value in the query.  Using createOdbcDate() fact, without all the extra horsing around adding things together and using the dateFormat() attribute as the previous poster suggested.

    --

    Adam

  • Wat is the problem with this simple query?

    I use 10gxe.
    This is the query that does not work
    Whenever I'm him running a pop-up windows is coming
    and asks me to enter the bind variables... Should wat I do?
    Here's a question prntscrn.

    http://potupaul.webs.com/at.html


    G_message VARIABLE VARCHAR2 (30)
    BEGIN
    : g_message: = "Œuvres of My PL/SQL block;
    END;
    /
    G_message IMPRESSION

    Edited by: user4501184 may 18, 2010 12:42 AM

    use sqlplus 't's work' ng

    run
    cmd
    sqlplus / as sysdba
    G_message VARIABLE VARCHAR2 (30)
    BEGIN
    : g_message: = "Œuvres of My PL/SQL block;
    END;
    /
    G_message IMPRESSION

    hope this helps
    Daniele

  • Problems with the simple serial communication.

    I followed a tutorial online to start learning basic communication series. The involved tutorial shorting pins 1 and 3 on port 1 Comm and write a simple program (attached). I've edited it a bit, the program to see varied results I get when trying to write and read a simple sentence via a serial port.

    Could someone explain what causes the kind of result shown in "Serial Comm example.png"? I think it has to do with timing. Why would be transmitted only the parts of the sentence?

    Thank you

    Sarah

    sarahzig wrote:

    The involved tutorial shorting pins 1 and 3 on the Comm 1 port

    What should be pins 2 and 3?  On a standard serial port DB-9, pin 2 is the receive and pin 3 is the transmission.

    Now for your code...

    1. move the Serial Port to be before the loop to set it up.  Simply configure the port once.

    2. close the port after the loop.

    3. managing your error after closing.

    4 stop your loop on an error or the stop button has been pressed.  You will need a RC in there.

    5. no need to Flush Buffer function.  Remove it.

    6. using the bytes to the Port is a dangerous thing.  It introduced all kinds of race conditions that are interesting.  Instead, say VISA reading to read the number of bytes that you expect to read.

    6a. Moreover, don't forget to send a character to end of line at the end of your data and all the number of bytes to read something a lot more than you ever expect read.  The VISA read will stop reading when he a) sees the number of bytes, it was said to read, b) sees the stop character (currently enabled and set to a line break, which is part of the end of line), or c) the time-out occurs.  Whichever comes first.

    7. with 6, the wait is no longer necessary.

  • Problem with the simple Select statements

    Hi experts,

    I have with SQL Server and I'm going to hurt when I use the similar syntax in sqlplus to query an Oracle table.

    For example... my table contains column SCHID SET in the numeric form. Table has thousands of lines and the SCHID column is filled.

    Select TOP 100 AFTSCHAUXDATA SCHID;

    Get the "Word FROM key not found where expected" error

    Select DISTINCT from AFTSCHAUXDATA SCHID;

    Download "no selected lines.

    Can someone help me please?

    Thank you, John

    Can someone tell me how to find the names of the 20 largest tables (bigger which means that most of the files)?

    Once you have updated statistics on the table, you can query the DataDictionary: USER_TABLES/ALL_TABLES/DBA_TABLES.
    I'm assuming that user_tables will do:

    select *
    from ( select table_name
           ,      num_rows
           from   user_tables
           order by num_rows desc nulls last
         )
    where rownum <= 20; 
    

    You can find more explanations about the DataDictionary in the Oracle Online Documentation.
    Just do a quick and easy search
    http://www.Oracle.com/pls/db112/homepage
    or
    http://www.Oracle.com/pls/db102/homepage
    Depending on your version of the database.

  • Problem with the help of oraext: query-database in the transformation (XSLT 2.0)

    Hello!
    I m facing a problem with the help of oraext: query-database.

    In my transformation im try the following (Simplified):
    <xsl:template match="*">
      <xsl:variable sqlQuery="select ....."/>
      <xsl:variable name="storeSec" select="oraext:query-database($sqlQuery,true(),true(),'jdbc/xref')/>               
        <xsl:choose>
         <xsl:when test="string-length($storeSec/ROWSET/ROW[1]/STORE_PART_SECTION) > 0">
              <xsl:value-of select="$storeSec/ROWSET/ROW[1]/STORE_PART_SECTION"/>
         </xsl:when>
           <xsl:otherwise>
                <xsl:value-of select"some other val"/>
           </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    {code}
    
    This always results in +some+ +other+ +val+ !!
    I´v checked the output from oraext:query-database by using getcontentAsString and if I instead test putting the expected output from oraext:queryDatabase in my variable it gives me A100 which is what i expected.
    
    {code}
    <xsl:template match="*">
      <xsl:variable sqlQuery=select ....."/>
      <xsl:variable name="storeSec">
        <ROWSET>
         <ROW num="1">
           <STORE_PART_SECTION>A100</STORE_PART_SECTION>
         </ROW>
         <ROW num="2">
           <STORE_PART_SECTION>XXm</STORE_PART_SECTION>
         </ROW>
        </ROWSET>
      </xsl:variable>               
        <xsl:choose>
         <xsl:when test="string-length($storeSec/ROWSET/ROW[1]/STORE_PART_SECTION) > 0">
              <xsl:value-of select="$storeSec/ROWSET/ROW[1]/STORE_PART_SECTION"/>
         </xsl:when>
           <xsl:otherwise>
                <xsl:value-of select"some other val"/>
           </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    How to get the correct value when you use oraext:query - database?

    How should you exit? Several item ID with each having a value of the result set?
    If Yes, then you can try following:

     
                        
                            
                        
                             
                                  
                             
                        
                            
    
  • problem with the query insert masking character @.

    Hi the gems...

    I do through xml schema, run... means using a batch file, I'll call the xml files and the xml file contains the names of files containing all the DDLs and LMD...

    No problem with the DDL...

    now when I run the LMD, all are working well except a few insert scripts...

    Insert into TABLE_NAME (EVENT_ID, EVENT_DESC, EVENT_MESSAGE_TEMPLATE, EVENT_MESSAGE_SUBJECT) values (4, 'abcdefgh',)
    'Hi,
    Order details:
    @Order_ID #.
    @Instrument_ID #.
    This is an automated email. Please do not reply.',
    "executed");

    This kind of scripts insert failed with the error "[ora: sqlplus] SP2-0310: could not open the file" Order_ID #, .sql.

    This problem is due to the @ character before the data...

    problem doesn't happen when I run the script explicitly, xml perform only the origin of the problem

    So, I need to know if there is a way to hide the sign @...

    Please help... Thanks in advance

    user12780416 wrote:
    "[ora: sqlplus] SP2-0310: could not open the file" Order_ID #, .sql.

    In SQL * more the @ character means: run a script. That would explain the error message.
    The real problem is that your chain is written on several lines. A string like this might work:

    {code}
    Insert into TABLE_NAME (EVENT_ID, EVENT_DESC, EVENT_MESSAGE_TEMPLATE, EVENT_MESSAGE_SUBJECT) values (4, 'abcdefgh',)
    "Hi," | Chr (10)
    ||' Order of details :'|| Chr (10)
    |' @Order_ID #' | Chr (10)
    |' @Instrument_ID #' | Chr (10)
    ||' This is an automated email. Please do not respond. »
    "executed");
    {code}

    But it might not be a usable workaound.
    As you create the string insert sort, you might be able to replace all line breaks in the present with you own custom lines.

    Replace (yourEventMessage, Chr (10), "' |) Chr (10): "')

  • I have a problem with the HP Deskjet2545 do not print on the computer.

    Printer does not print. Computer says "printer error". Convenience store said that the problem is resolved. The printer is 'ready' doesnot even impression. What is the solution?

    Original title: hpDeskjet2545.

    Hi Matt,

    Thanks for posting your query in the Microsoft Community.

    Printers to print documents, photos, cards and calendars. You have a problem with the printer doesn't work is not on the computer. It can be difficult when something that is important to you does not work as expected. It's pretty simple and we're here to help you solve the problem. We work as a team and get this sorted out.

    Please answer these questions-

    (1) what is the exact error message?

    (2) have you tried the troubleshooting steps?

    (3) what is the version of Windows installed on the computer?

    (4) have you made changes on the computer before the show?

    I would like more information about the issue.

    Note: assuming that you are running Windows 7, I would like to suggest some troubleshooting steps.

    Method 1-

    I would have you look at the article-

    Why can I not print?

    http://Windows.Microsoft.com/en-us/Windows7/why-cant-I-print

    Solve printer problems

    http://Windows.Microsoft.com/en-us/Windows/printer-problems-in-Windows-help#fix-printer-problems=Windows-7&V1H=win8tab1&V2H=win7tab1&V3H=winvistatab1&v4h=winxptab1

    Method 2-

    I wish that you uninstall and reinstall the printer.

    See the article-

    Install a printer

    http://Windows.Microsoft.com/en-us/Windows7/install-a-printer

    Method 3-

    I would have you go through the troubleshooting proposed by HP guide.

    Check out the link-

    http://h10025.www1.HP.com/ewfrf/wc/documentSubCategory?tmp_task=solveCategory&LC=en&DLC=en&cc=us&product=3571292

    Let us know if you need assistance regarding the issue. We will be happy to help you. We at Microsoft, strive for excellence and provide our customers with the best support.

    Thank you.

  • I have a problem with the Narrator, repeating words and phrases.

    original title: NARRATOR in WIN7 SUPPORT

    I use windows7.  The annoying Narrator sometimes voices repeat words and phrases.  I also need help, change of voice and using Narrator to read aloud my text book I downloaded.  It is in PDF format.

    Original title: Narrator sometimes repeat words and phrases

    Hello

    Thanks for posting your query in the Microsoft Community.

    You have a problem with the Narrator, repeat words and phrases. It can be difficult when something that is important to you does not work as expected. It's pretty simple and we're here to help you solve the problem. We work as a team and get this sorted out.

    Please answer these questions-

    (1) exactly where you run the Narrator?

    (2) the Narrator extends from a particular document?

    (3) have you made changes on the computer before the show?

    I would like more information about the issue.

    Method-

    I wish that return you the items for assistance-

    Narrator doesn't read what I expect him

    http://Windows.Microsoft.com/en-us/Windows7/Narrator-doesn

    Hear text read aloud with Narrator

    http://Windows.Microsoft.com/en-us/Windows7/hear-text-read-aloud-with-Narrator

    Let us know if you need assistance regarding the issue. We will be happy to help you. We at Microsoft, strive for excellence and provide our customers with the best support.

    Thank you.

  • problem with the definition of a boolean as output parameter type

    Hi, I have a problem with the definition of type boolean as output parameter and it must return true if the query procedure retrieves one line else it shouuld return false

    Hi, I have a problem with the definition of type boolean as output parameter and it must return true if the query procedure retrieves one line else it shouuld return false

    And what are the issues? Its simple.

    SQL> create or replace procedure is_emp_exist
      2  (
      3     p_empno  in  emp.empno%type
      4   , p_result out boolean
      5  )
      6  as
      7     l_empno emp.empno%type;
      8  begin
      9     select empno into l_empno
     10       from emp
     11      where empno = p_empno;
     12
     13     p_result := true;
     14  exception
     15     when no_data_found then
     16        p_result := false;
     17  end;
     18  /
    
    Procedure created.
    
    SQL> declare
      2     l_result boolean;
      3  begin
      4     is_emp_exist (7788, l_result);
      5
      6     if l_result then
      7        dbms_output.put_line('Employee Exist');
      8     else
      9        dbms_output.put_line('Employee does not Exist');
     10     end if;
     11  end;
     12  /
    Employee Exist
    
    PL/SQL procedure successfully completed.
    
    SQL> declare
      2     l_result boolean;
      3  begin
      4     is_emp_exist (1000, l_result);
      5
      6     if l_result then
      7        dbms_output.put_line('Employee Exist');
      8     else
      9        dbms_output.put_line('Employee does not Exist');
     10     end if;
     11  end;
     12  /
    Employee does not Exist
    
    PL/SQL procedure successfully completed.
    
    SQL>
    
  • Problem with a simple integral

    Hi all

    I have 2 problems with a simple integral, and I do not understand how the first HP solves.

    My first problem is that if I add a constant before my variable, the answer becomes really weird.

    My second problem is that if I just change one letter (q becomes Q), the answer changes completely.

    I am attaching a picture of the calculations so that you can understand my problem.

    Thank you very much for your help

    Kind regards

    Xavier

    When you type wx you now have a variable named "wx" - not w * x which is what I suspect you intend. You must manually add a multiplication between them.

    When you use the Q, you are actually using the predefined global real variable that is most likely the value 0. If you've stored 2 in Q, I suspect that you'll get a different result. Remember that all variables in capital letters from A to Z and THETA and already defined as real numbers. VARS-> HOME-> REAL-press and you will see them.

  • Problem with the D-U-N-S: Urgent

    I am trying to register my organization on an Apple Developer program.

    I got a valid D-U-N-S number sent to me by D & B on 2 February 2016.

    However until now whenever I try to register my business using the D-U-N-S number, I get the following error message:

    «The information you entered does not match your profile in the D & B database.» "Before submitting your information to the Organization, get your D & B profile."

    I watched and the profile exists.

    I sent a query to D & B, but we were told to contact Apple directly.

    We have created a deal on the Apple Support and we ardently and desperately waiting for a response.

    Someone from the community can help me on this issue. Please consider as urgent.

    Hello Nabla_business,

    Desperate? You should be aware that Apple is moving at glacial speed on these issues. On the one hand your number DUNS has been created. You must wait 60 days before attempting to create an account. However, it seems that your information has been through to Apple. You will have to wait for the Apple support to constct you. You may need to make repeated through several channels attempts to attract the attention of Apple.

    I had a similar experience. The problem was that when Apple imported data from Dun & Bradstreet, they completely scrambled my address. But I had no problems creating my account so your questions can be worse.

    And I would warn your words "emergency". Apple has a huge backlog of similar problems. In my case, the only way was able to get my problem resolved was when a Technical Support engineer used Apple Remote to go into my machine and then look at the developers own Apple Site. But I had this problem to be solved. I had many other problems with the tax forms.

    My point is that it can take up to a year, in order to get your developer account fully Setup. I suggest you open an account, personal development and test purposes. Be sure to use IDS bundle dedicated to this purpose. This way, when your business is finally set up, then you will be ready to go and become familiar with the process.

  • Problem with the HP G62 recovery disks

    Hello

    I'm having a problem with the restoration of the operating system on your laptop HP G-62. When I first bought the laptop, I was unable to make the recovery discs, so I ordered recently a few new HP. Because I have installed Ubuntu on the laptop, I wiped it from the disk hard drive used Wipedrive to remove the old Ubuntu operating system I had installed.

    Laptop computer reads the first disc ok and installs the component of windows, but when the screen lights up asking the two disc number it freezes and never installs anything when you try to move anything that used to screen it doesn't matter what and he used to install the second disk. He repeats just 'Please wait '.

    Thank you, Robert

    Hi, Robert:

    I can't help you get the recovery disks to work, but if you can read all 25 characters of the product key 7 windows on the bottom of your PC, you can do your own installation disc 7 windows to reinstall the operating system.

    Here's how:

    If you can read the Microsoft windows 7 25-character product key, you can download simple Windows 7 ISO files to burn on a DVD for the version of windows that is installed on your PC, and which is listed on the Microsoft COA sticker on your PC case.

    Burn the ISO with the option to burn the ISO on your DVD burning program and burn it at the slowest possible speed that will allow your program. This will create a bootable DVD.

    Or use the installation of Windows 7 USB/DVD tool to compile the ISO file that you download from Digital River. Link and instructions below. You need a 4 GB flash drive to use the USB compilation method.

    http://www.microsoftstore.com/store/msstore/HTML/pbPage.Help_Win7_usbdvd_dwnTool

    Use 25 characters on the PC product key to activate the installation.

    The key will activate a 32 or 64 bit installation.

    Then go to the support of the PC and driver page to install the drivers you need.

    Link to downloads ISO of W7 is below.

    http://www.mydigitallife.info/official-Windows-7-SP1-ISO-from-Digital-River/

    Paul

Maybe you are looking for