LOV query is not valid, a display and a return value is necessary, column n

Hello

I AM FACING
LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, 
the first FROM clause in the SQL statement must not belong to the in-line query.
with two table, I create lov

the tables are
CREATE TABLE  "CRM_SALES_DEPARTMENT" 
   (     "DEPT_ID" NUMBER NOT NULL ENABLE, 
     "CUSTOMER_ID" NUMBER NOT NULL ENABLE, 
     "DEPT_CODE" VARCHAR2(50) NOT NULL ENABLE, 
      CONSTRAINT "CRM_SALES_DEPARTMENT_PK" PRIMARY KEY ("DEPT_ID") ENABLE
   )
CREATE TABLE  "CRM_SALES_CUSTOMERS" 
   (     "ID" NUMBER, 
     "CUSTOMER_NAME" VARCHAR2(255), 
     "CUSTOMER_ADDRESS1" VARCHAR2(255), 
      PRIMARY KEY ("ID") ENABLE
   )
I USE QUARY
select (SELECT CS.CUSTOMER_NAME FROM CRM_SALES_CUSTOMERS CS WHERE CS.ID=SD.CUSTOMER_ID) AD D, SD.CUSTOMER_ID R  
from CRM_SALES_DEPARTMENT SD where SD.DEPT_CODE=:P16_MARKET 
But who show me LOV query is not valid, a display and a return value is needed, the column names must be
different. If your query contains a query online, the first CLAUSE in the SQL statement must not belong to the query online.

How to solve this problem.

Thank you

Published by: 805629 on January 10, 2011 03:46

Published by: 805629 on January 10, 2011 03:58

Published by: 805629 on January 10, 2011 03:59

¿AD?
Select (SELECTION of CS. CLIENT_NAME CS CRM_SALES_CUSTOMERS WHERE CS.ID = SD. CUSTOMER_ID) AD D, SD. CUSTOMER_ID R
CRM_SALES_DEPARTMENT SD where SD DEPT_CODE =: P16_MARKET

But the correct way is a join outher

select CS.CUSTOMER_NAME D, SD.CUSTOMER_ID R
from CRM_SALES_CUSTOMERS CS,
        CRM_SALES_DEPARTMENT SD
where SD.DEPT_CODE=:P16_MARKET
And CS.ID(+)=SD.CUSTOMER_ID

Tags: Database

Similar Questions

  • LOV query is not valid, a display and a return value is required

    Dear Sir.

    I use this code to select list
    select (select CD.LOOKUP_NAME from CRM_LOOKUP_DTL CD where CD.ID=GC.USER_PRD_GR_ID) AS DISPLAY_VALUE,USER_PRD_GR_ID AS RETURN_VALUE 
    FROM CRM_ISSUE_PRO_GRP GC
    That show me
    , the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.
    How to solve it.


    Thank you

    Published by: Sophie on May 23, 2011 03:26

    You can try this?...

    SELECT CD.LOOKUP_NAME    d,
           GC.USER_PRD_GR_ID r
    FROM   CRM_ISSUE_PRO_GRP GC,
           CRM_LOOKUP_DTL CD
    WHERE  CD.ID = GC.USER_PRD_GR_ID
    

    See you soon

    Ben

  • I have a column with two values, separated by a space, in each line. How to create 2 new columns with the first value in a column, and the second value in another column?

    I have a column with two values, separated by a space, in each line. How do I create 2 new columns with the first value in one column and the second value in another column?

    Add two new columns after than the original with space separated values column.

    Select cell B1 and type (or copy and paste it here) the formula:

    = IF (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    shortcut for this is:

    B1 = if (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    C1 = if (Len (a1) > 0, Member SUBSTITUTE (A1, B1 & "", ""), "")

    or

    the formula of the C1 could also be:

    = IF (Len (a1) > 0, RIGHT (A1, LEN (A1) −FIND ("", A1)), "")

    Select cells B1 and C1, copy

    Select cells B1 at the end of the C column, paste

  • update line and reset the value of the column

    I have table (CORS_MTR) with 3 columns...

    SEQ ID of the EPR the ID of the child / / desc
    100221one
    101222two

    new entry as 1 number , that means change the flow of child #

    102223three

    When I enter the new line in number of children 1 instead of 2 and then the values of the column (child id, desc) another need to be reset as...

    SEQ ID of the EPR the ID of the child / / desc
    100222two
    101221one
    102223three
    103224four
    SEQ PRT_ID CHILD_ID DESC_
    100 22 1 one
    101 22 2 two
    102 22 3 three

    declare

    number of p_seq: = 103;

    number of p_prt_id: = 22;

    number of p_child_id: = 1;

    p_desc varchar2 (25): = 'a ';

    Start

    Update cors_mtr

    set seq = case when child_id = p_child_id

    then seq + 1

    other seq - 1

    end

    where prt_id = p_prt_id

    and child_id (p_child_id, p_child_id + 1);

    insert into cors_mtr (seq, prt_id)

    values(p_seq,p_prt_id);

    Update cors_mtr

    Set child_id = (select max (child_id) + 1 of the cors_mtr).

    desc_ = (select to_char (to_date (max (child_id) + 1, 'J'), 'jsp') of cors_mtr)

    where child_id is null.

    end;

    SEQ PRT_ID CHILD_ID DESC_
    100 22 2 two
    101 22 1 one
    102 22 3 three
    103 22 4 four

    Concerning

    Etbin

  • URLS suddenly not valid... and a lot more (worse)

    Earlier, I got this when trying to access a web site:

    URL invalid the requested URL ' / ', is not valid.

    Reference #9.87cc8f18.1290546177.eeb029

    THIS happens for different sites (most sites is large enough; newspapers, etc.). HOWEVER, and perhaps a little later, my internet connection stops. I can get to some network drives, I can ping websites, but not recover files through HTTP. Reset is the only way to solve it.

    I have two computers connected to a linksys router. The XP has these problems at least once a day; the Win7 has never no problem. Problems occur all of a sudden. I tried to turn the market as well as the cable modem router. Is not serious. BUT only the XP computer is affected. Any ideas where I should look?

    Check your HTTP and HTTPS protocols.  See www.oehelp.com/ielnk.aspx
     
    Steve
     

    Earlier, I got this when trying to access a web site:

    URL invalid the requested URL ' / ', is not valid.

    Reference #9.87cc8f18.1290546177.eeb029

    THIS happens for different sites (most sites is large enough; newspapers, etc.). HOWEVER, and perhaps a little later, my internet connection stops. I can get to some network drives, I can ping websites, but not recover files through HTTP. Reset is the only way to solve it.

    I have two computers connected to a linksys router. The XP has these problems at least once a day; the Win7 has never no problem. Problems occur all of a sudden. I tried to turn the market as well as the cable modem router. Is not serious. BUT only the XP computer is affected. Any ideas where I should look?

  • What does "Channel status is not valid" message mean and how it can be solved.

    Whenever I have upload documents, "ms security essentials" using any Explorer of the material are downloaded. But when I try to install it, its was not and I get a message "channel status is not valid". What this means and how it might be solved.

    Dear Sandeep, thanks for taking the trouble. However, it was too complicated for me. I chose an easy option. I went and restored the system to a much older date. That solved my problem.
    Thamnx

  • Satellite P200 - 1 K 8 - could not get the display and audio drivers to work

    Hello.
    I'm getting desperate. I tried everything I could imagine.

    First of all - do not get the control center catalyst to work, I don't have the graphics driver installed now (I tried both - Toshiba and Mobility Modder modified driver ATi - none works.)
    Second - when I install the audio driver Realtek audio Manager is encoutering the problem and needs to close every time at startup. And Yes, I updated the BIOS to version 5.20 installed XPSP3, chipset driver installed (the most recent Intel homepage or one of Toshiba, anyone, always the same question).

    Help, please. I don't want to spend the rest of my life trying to get XP on my laptop.
    Thanks in advance.

    Can you please send the number of full model of your laptop?

  • Configuration not valid ASP.htm and Date.htm

    Hello. I reinstalled my DW8 and applied the patch x.2. Now, when I open the program, I get the following in a dialog box error message:

    "The following translators were not loaded due to errors: ASP.htm contains configuration information that is invalid.". Date.htm has configuration information that is invalid. »

    If you've seen this error and know a fix, please let us share thanks!

    r

    The fixed. Following the troubleshooting tips, here.

    Rename the... / file Dreamweaver 8 to... / Dreamweaver 8 OLD did the trick.

    r

  • My Apple Watch will not show its display and its new brand

    MY wife has paired his brand new iwatch all at the time and now the screen is empty, even if the watch is in talks with him

    Hello

    Voice-over (a function of accessibility that includes screen curtain) has been activated on your wife watch.

    • To turn off VoiceOver:
      • On the iPhone of your wife, in the application of the watch, go to: My Watch (tab) > general > accessibility > VoiceOver > disable VoiceOver and screen curtain.
      • Or use Siri: press and hold the digital Crown until your wife feels a slap on her wrist > and then say: "Disable VoiceOver."
    • If the accessibility shortcut has been enabled and configured for VoiceOver, your wife can also enable and disable functionality more conveniently:
      • On the Watch: quickly press the digital Crown (the round button) three times.
    • To set up accessibility shortcuts:
      • On the iPhone of your wife, in the application of the watch, go to: Watch My > general > accessibility > accessibility shortcut (bottom) > select / deselect VoiceOver.
  • Have applications not valid in recycled and am not able to delete

    am unable to remove invalid applicatons in recycled

    Right-click on the Recycle Bin.

    Select "Properties".

    Select "don't move files to the Recycle Bin. Delete the files when they are deleted immediately.

    Close the window, restart your computer.

    They must now be gone from the trash.

    CAVEAT!     Do not use this method UNLESS you are absolutely sure you want to permanently delete everything you send to the trash.

    It is the method that I use for everything I send to the Recycle Bin IS to go. For this purpose!

  • After restart of the mysterious, not the personal files and windows returned to the original version

    I tried various recovery tools to fix this and have come to terms with the loss of almost all of my files.  However, my hard drive always think they are there and not free space.  Any suggestions?

    This looks like a factory restore was performed.  How is a mystery.  Is what kind of computer?
    Y at - it by chance a C: file \Windows.old?   If so, watch Windows.old\Users\%Username% for files.

    If this isn't the case - you can run chkdsk /f since you say disk space seems to be in use to see if it goes to the top of any other file system error.  If nothing of other works and you are sure that there is space missing, I would try to look at the drive outside Windows (by a bootable OS or the connection to another computer) in which case a kit root to cache files, a thought which is quite a long shot.

  • join query for the type of constraint and the type of the table column name

    Hi, this is my request
    select 
    table_name  , column_name  from user_cons_columns where table_name='EMP_CLASS'
    
    table_name     column_name
    
    
    emp_class        empno
    emp_class        deptno
    
    
    
    select constraint_type,table_name  from user_constraints where table_name='EMP_CLASS'
    
    
    
    constraint_type    table_name
    
    p                        emp_class
    u                        emp_class
    
    
    I need query for this out put combining above two query.
    
    constraint_type        column_name   table_name
    p                             empno            emp_class
    
    u                            deptno             emp_class
    Thank you
    Madam.

    Try this:

    SQL> SELECT ac.table_name,ac.constraint_type,ac.constraint_name,acc.column_name,acc.position
      2  FROM all_constraints ac, all_cons_columns acc
      3  WHERE ac.table_name = acc.table_name
      4  AND   ac.constraint_name = acc.constraint_name
      5  AND  ac.table_name = 'TABLE_NAME'
      6  /
    
  • BUG: APEX 4.1 Application Builder: LOV query Source

    APEX 4.1.0.00.32 on apex.oracle.com

    The following SQL code is rejected as a dynamic source query LOV in the LOV Wizard (page 4007) and shared components > list of values (page 4111):
    select lov_value lov_label, lov_value
    from
      (select 'Mens' lov_value from dual
      union all
      select 'Womens' from dual
      union all
      select 'Accessories' from dual)
    with
    >
    1 error has occurred
    < li > LOV query is not valid, a display and a return value, column names must be different. If your query contains a query online, the first CLAUSE in the SQL statement must not belong to the query online.
    >
    Don't see how it violates the rules?

    However, change in the body of a function that returns a SQL query and it is allowed on two pages:
    return q'{
    select lov_value lov_label, lov_value
    from
      (select 'Mens' lov_value from dual
      union all
      select 'Womens' from dual
      union all
      select 'Accessories' from dual)}'
    And the SQL of origin is recognized as a local of LOV definition to edit the Page item (page 4311).

    Hello

    I filed bug # 13520001 to change the checking logic of the wizard named LOV to use the same controls that we do on "Edit Item Page" (4311).

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Can someone tell me what is the problem with this LOV query please?

    This query works very well...

    Select filter_name display_value, FILTER_ID return_value
    from OTMGUI_FILTER where username = 'ADAM '.

    But this one...

    Select filter_name display_value, FILTER_ID return_value
    from OTMGUI_FILTER where username = apex_application.g_user

    Gives the following error.

    1 error has occurred

    * LOV query is not valid, a display and a return value is needed, the column names must be different. If your query contains a query online, the first CLAUSE in the SQL statement must not belong to the query online.

    Thank you very much

    -Adam vonNieda

    Adam:

    Define the LOV query as follows

    declare
    l_val varchar2(100) := nvl(apex_application.g_user,'ADAM');
    begin
    return  'select enAME display_value, empno return_value
    from emp where deptno = '''|| l_val || ''''
    end;
    

    CITY

  • Drop-down list LOV shooting required field validation

    Hello

    I use Jdev 11.1.1.6.
    My VO is based on entities. I have 3 domains in this VO as F1, F2, F3
    3 fields are required.
    F1 has Combo Lov-based model implemented. List attribute LOV lookupId returned to F1 and the attribute List lookupDesc at F2.
    F2 is mandatory and can be changed. Idea is that the default text returned by lov and then user can update the description.

    Scenario 1: does not work >
    During execution, in mode, create when I try to select a value for this lov combo, it triggers the validation of required field for F2 (only for F2 and F3 not) and does not display the list of values. I can't do to show the list to enter some data in F2.
    < af:inputComboboxListOfValues > a autoSubmit = 'true' and immediate = "false" and a partialTriggers F2 = "id of F1".

    Scenario 2: < work >
    For test purposes, if I do unalterable F2 it works perfectly but F2 is editable and mandatory as well.
    < af:inputComboboxListOfValues > a autoSubmit = 'true' and immediate = "false" and a partialTriggers F2 = "id of F1".

    Scenario 3: < work >
    On other pages, I've implemented combo lov where the lov is implemented on the reference field and the return value only the Id column and not in any other field. This scenario works perfectly, even with the mandatory fields on the page.
    < af:inputComboboxListOfValues > a autoSubmit = 'true' and immediate = "false".


    Thank you
    JAI

    Try to remove F2 partialTrigger (a partialTriggers = 'F1 id'),
    and join valueChangeListener on F1, in which you can refresh partially F2 (in code)
    Of course, do autoSubmit F1.

    Scenario 1:
    During execution, in mode, create when I try to select a value for this lov combo, it triggers the validation of required field for F2 (only for F2 and F3 not) and does not display the list of values. I can't do to show the list to enter some data in F2.
    a autoSubmit = 'true' and immediate = "false" and a partialTriggers F2 = "id of F1".

Maybe you are looking for

  • Void Panel opens once

    I have a series of under vi configured to open the front panel when it is called, it works well, but in each of these vi called a panel of sup of my main DAQ vi which is located in a separate task I use Panel sub opening and closing, whenever one und

  • DeskJet 2131: Scanner cannot be installed.

    I bought a HP DeskJet 2131 all-in-one printer for my home use on 11.07.2016 for use with my MacBook Pro with OS X 10.11. The printer can also be used as argued by HP with OS X 10.11. I followed all the steps in the HP Web sites, but could not make th

  • No sound on the TV when connected over HDMI

    I have HP G62 laptop. I seem to have lost the audio HDMI when I connect to the TV. Help, please! Have checked the Audio on the control panel and seem to only Realtex Hi Def speakers have implemented.

  • Question of Control Panel

    I just bought a printer HP 6520, no problem, unit works great, I love it. Issue. On the touch screen when there is more than one page to any topic (ie 1/2), how to scroll the next page? In the upper right corner, there is a small icon (key) to get th

  • console connection issues 1142

    Hey all - I have a couple slight 1142 AP I need preparation and we tried to comfort them. but all I get is out starter and standard messages do not have connectivity controller.  I see the messages 'Press RETURN to start' and "CLI engaged", etc...  B