DISTINCT in SELECT statements for  Entities / Views - Oracle JDeveloper 11G

Hi Steve,
i have a question about using DISTINCT in SELECT statements for
Entities / Views. On Oracle JDeveloper 11G ADF / BC4J
--- This is unique---
SELECT
distinct(GC."course_title"),
GC.SEC_GRP_PARENT_ID,
from "grp_courses" GC
--- This is NOT unique, but ROWID seems to be mandatory as PrimaryKey---
SELECT
distinct(GC."course_title"),
GC.SEC_GRP_PARENT_ID,
rowid
from "grp_courses" GC
How to use this query;
SELECT
distinct(GC."course_title"),
GC.SEC_GRP_PARENT_ID,
from "grp_courses" GC
and yet still be able to use it in View / Entity without a Primary Key or some equivalent solution.
Thanks & Regards,

Hi, OK - I got it to work...
Some notes:
1) The View wizard cannot be initiated from the Entity Object.
2) During the View wizard process - do not associate with Entity
3) Selected columns must be mapped as expressions
4) Using non-distinct columns will override the distinct function

Similar Messages

  • Can we write the select statement on maintence view for data retreval

    Can we use the select statement on maintence view
    Regrads
    Diva

    No. U cannot write a select on maintenance view.

  • Select statement on maintenance view.

    Hello Friends,
    I have a quick question. I have a maintenance view, and I want to do a select statement on this view in an ABAP program, but seems like the view is not filled with data when running the program.
    How do I get the view to be populated at runtime in the ABAP program? the work area and the internal table is TYPE of the  view..
    Here's the code:
    select * into wa
      from view
      where bukrs = P_BUKRS
               vtweg in S_CHNL.
        append wa to it.
      endselect.
    best regards B

    Hello B,
    Just to inform you: "You can select data only from Database Views".
    You can design a work-around for this, by taking look @ the Join tables. May i know form which View you want to get the data?
    BR,
    Suhas

  • How to write Select statement for this codition

    I need to check whether SGTXT contains BELNR value.
    SGTXT is a text field and It should be matched with BELNR
    How to write select statement for this.
    Select AUGBL AUGDT into t_BSAD
    from BSAD
    where SGTXT should have the given BELNR Value.
    Plz note : Here I cannot give as SGTXT = BELNR as coz BELNR have only 10 digits.

    Hi,
    data temp(12).
    concatenate '%' belnr '%' into temp.
    Select AUGBL AUGDT into t_BSAD
    from BSAD
    where SGTXT like temp.
    If belnr is having multiple values,just create a internal table as follows.
    types : begin of ty,
            belnr....
            temp(12),
            end of ty.
    data itab_ type standard table of ty.
    data wa type ty.
    loop at itab into wa.
    concatenate '%' wa-belnr '%' into wa-temp.
    modify itab from wa index sy-tabix transporting temp.
    endloop.
    Change your select statement accordingly.
    Kindly reward poits if it helps.

  • Select statement for summing values in column?

    How to write a select statement for sap standard table which contains data  as given below
    col1        col2
    A     10
    A     20
    A     30
    B     50
    B     60
    C     70
    Need the output of select in  internal table as given below
    A     60
    B     110
    C     70
    Regards,
    Rachel

    Thanks for all the valuable input.
    Below I have used sum in select statement(check case 2"),but i am not getting required o/p.
    Kindly guide me.
    case1 :
    select aebeln aebelp bpackno  bmenge
    into corresponding fields of table itab
    from ( eslh as a inner join esll as b
    on bpackno = apackno )
    where a~ebeln = 6000000100
    and a~ebelp = 00010
    and a~packno = '0000001025'
    order  by aebeln aebelp b~packno .
    O/p for the above .
    ebeln                       ebelp         packno                             menge
    6000000100     00010     0000001025              6.000
    6000000100     00010     0000001025               5.000
    6000000100     00010     0000001025              2.000
    6000000100     00010     0000001025              1.000
    6000000100     00010     0000001025              2.000
    case2:
    select aebeln aebelp bpackno  sum( bmenge )
    into corresponding fields of table itab
    from ( eslh as a inner join esll as b
    on bpackno = apackno )
    where a~ebeln = 6000000100
    and a~ebelp = 00010
    and a~packno = '0000001025'
    group by aebeln aebelp b~packno
    order  by aebeln aebelp b~packno .
    6000000100     00010     0000001025     0.000
    Edited by: Rachel on Nov 25, 2008 11:45 AM
    Edited by: Rachel on Nov 25, 2008 11:46 AM

  • Regarding select statement for this requirement

    Hi................
    good evening
    here is a requirement.
    i want to retrieve data from the following table.but how to join these table is my dought.
    tables  fields
    t001w--werks " plant id
    t001w--name1 " pl;ant name
    t001w--regio " plant address
    ekko--ebeln " purchase  order
    ekko-erdat : creation date
    ekko-ernam "name of the person
    ekpo-ebelp " item
    ekpo-bstyp "purchase order type
    eket-erdat " delivery date
    mara-matnr " material number
    these are the tables and fields.now we want to retrive data from these tables
    how we have to code select statement.
    selection-screen is
    plant id
    order type
    delivery date
    please provide select statement for this requirement.
    thanks and regards.
    k.swaminath  reddy.

    Is this what you are looking for?
    SQL> CREATE OR REPLACE FUNCTION f_team
      2  RETURN VARCHAR2
      3  IS
      4    s_return VARCHAR2(500);
      5  BEGIN
      6    FOR i IN ( select team from t_team order by 1) LOOP
      7      s_return := s_return || i.team || ', ';
      8    END LOOP;
      9   
    10    RETURN substr(s_return, 1, length(s_return) - 2);
    11  END;
    12  /
    Function created.
    SQL>  SELECT f_team FROM dual;
    F_TEAM
    Australia, Bangladesh, England, India, Kenya, Pakistan, South Africa, UAE, USA, West Indies, Zimbabwe
    SQL>

  • Need Select statement for fetch the details

    Hi
      i want to fetch particular customer wise sales orderds and that sales order No  and  date of sales order was created..  and  that sales order related PO No  and Materials ..
    for this..   how can i write an executable programm.. is it needed to  define seperate  internal tables or single internal table is enough  ?
    what is the select statement for fetching  all these details..
    any help will be appriciated
    Thanks
    Bbau

    custmer master table is KNA1  knb1  knbk
    sales data tables r  VBAK VBAP VBEP
    Material data  MARA, MARAC, MARD
    PO RELATED ekko  ekpo  eket
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Feb 13, 2008 3:04 PM

  • Equivalent select statement for complex selection

    HI,
    What is the equivalent select statement for below mentioned condition.
    SELECT-OPTIONS : SALEDOCU FOR VBAK-VBELN OBLIGATORY,
                     DATE     FOR VBAK-ERDAT OBLIGATORY,
                     CHANEEL  FOR VBAK-VTWEG,
                     SALETYPE FOR VBAK-AUART OBLIGATORY DEFAULT 'QT'
                     NO INTERVALS NO-EXTENSION.
    Regards,
    John.

    hi,
    you can use following code.
    tables vbak.
    data : begin of t_vbak occurs 0.
             include structure vbak.
    data : end of t_vbak.
    select * from vbak into table t_vbak where
                            vbeln in saledocu and
                            erdat in date and
                            vtweg in chaneel and
                            auart in saletype.
    Hope this helps.
    Regards,
    Shashank

  • Select statement for retrieving infotype 1005 values w,r,t payscale

    Hi All,
    could you pls help me for the below requirement
    "select statement for retrieving infotype 1005 values with respect to the pay scale level.
    because pay scale level is having range of values in the infotype"
    Thanks in advance
    Prasad
    Please try it yourself first.
    Edited by: Suresh Datti on Aug 9, 2009 4:52 PM

    Hi,
    Code which you have written is correct when the R_DATE is having LOW and HIGH values, if the R_DATE is having only LOW value then this will be wrong, becuse if the R_DATE is having only LOW then OPTION value is not BT is should be EQ
    Regards
    Sudheer

  • Creating and Binding View Objects dynamically : Oracle Jdeveloper 11g

    Hello,
    We are trying to create and bind view objects dynamically to adf data visualization components.
    The view object is a result of multiple tables.
    We are using Oracle JDeveloper 11g Technical Preview. ( can't upgrade to TP2 or TP3 now).
    We have found this : http://radio.weblogs.com/0118231/stories/2003/07/15/creatingUpdateableMultientityViewObjectDefinitionsDynamically.html on our search for the same.
    The sample application however, is in 10g , hence required migration.
    Also, it was a standalone application with the TestClient.java having a main() method.
    Our requirement is for Web Application; we use Adf+jsf .
    Guidance of any sort is very much appreciated.
    Thanks in advance.
    -Anil Golla

    Hi,
    there also exist a forum for JDeveloper 11: JDeveloper and OC4J 11g Technology Preview
    What you are trying todo is not trivial because you need to not only dynamically create the VO, you would also dynamically need to create the binding meta data for it (assuming you use ADF). Not sure if the API to modify the binding is public, so posting it on the JDeveloper 11 forum bears a glimpse of hope for an answer
    In JDeveloper 10.1.3 you can't do this
    Frank

  • Problem with BundleUtils class in Oracle JDeveloper 11g Cookbook

    Hi All,
    While practising Using a custom exception class, in the first chapter of Oracle Jdeveloper 11g cookbook, author states:
    Note that in the Using a generic backing bean actions framework recipe
    in this chapter, we refactored the code in getMessage() to a reusable
    BundleUtils.loadMessage() method. Consequently, we changed the
    ExtJboException getMessage() in that recipe to the following:
    +public String getMessage() {+
    return BundleUtils.loadMessage(this.getErrorCode(),
    this.getErrorParameters());
    +}+
    Whereas no details of BundleUtils class is given in Using a generic backing bean actions framework recipe, which is giving compilation errors for CommonActions class.
    Any help will be greatly appreciated.
    Thanks in advance
    Best Regards
    Bilal

    Bilal,
    you are missing some points here. This is the jdev and adf forum. We don't have access to the code you mention. So we can't help you as long as you don't post the code here (which I doubt you are allowed to).
    Next, if you read https://forums.oracle.com/forums/ann.jspa?annID=56 you should have noticed that without giving at least your jdev version, help is hart to get.
    As said in the other thread, you should drop Nick a note so he can clarify this issue.
    Timo

  • Oracle JDeveloper 11g (11.1.2.2.0) (Build 6183)Installations

    I clicked the Studio Edition:11.1.2.2.0 Windows Install Download File button from the Oracle JDeveloper 11g (11.1.2.2.0) (Build 6183)Installations page. After that I clicked Save and a window displayed with the % complete. It goes to 99% complete and 1 sec left and this seems to hang at that point. I've left it going for several minutes and then eventually cancelled it. I have the correct jdk version. Any suggestions?

    You mean the download hangs at 99%?
    That its usually the point when your virus checker starts its work. Some such programs are known to have trouble with large archive files containing many files.
    Try to download with three virus checker turned off.
    Timo

  • Oracle JDeveloper 11g Release 2 (11.1.2.1.0) on HP UNIX  Release B.11.23

    Hi Friends,
    Please let us know wheteher Oracle JDeveloper 11g Release 2 (11.1.2.1.0) is certified / supported on HP UNIX (Itanium server) Release B.11.23
    (i could only see Other operating systems with Sun-certified JDK 1.6 Update 24 or later is supported on certifiction matrix in addition to windows/linux/mac)
    I don't find any installaer for thsi ? I could see only for windows/Linux and Generic. Do i ned to download generic one?
    I don't find Installation Document for this?
    Please provide me the same.
    Regards,
    DB

    Hi,
    don't know there is a certification for this platform. "Generic" however is the installer option for this platform. It requires you to have a certified Java SDK installed. JDeveloper runs on top of a JDK
    Frank

  • Oracle Jdeveloper 11g R1 has a Bug?-- Swing Application Deploy Error

    Oracle Jdeveloper 11g R1 (11.1.1.2.0) (build 5536)
    1. Create an empty swing application.
    File-->New-->Applications-->Java Desktop Application
    New-->Swing/AWT-->Frame
    2. Project properties--->Deployment: Create new JAR Deployment Profile: test
    3. Edit Deployment Profile: test
    File Groups --->new--->Create File Group (Type: Dependency Analysis) :da
    4. Error: Cannot enter "da"---->contributors , No display (such as "Libraris")
    5. If deploy it (test), I get an Unexpected Error.
    Error Messages:
    Title: StackOverflowError in o.ji.xml.JDevXmlIntergrationUtilsImpl:18
    Performing action Report a Bug...[ from oracle.jdevimpl.uieditor.UIEditorImpl ]
    Invoking command: [ from oracle.jdevimpl.uieditor.UIEditorImpl ]
    Performing action New...[ from oracle.jdevimpl.uieditor.UIEditorImpl ]
    Performing action Show Overview
    Performing action New...[ from oracle.ide.navigator.ProjectNavigatorWindow ]
    Invoking command: Class Generation[ from oracle.ide.navigator.ProjectNavigatorWindow ]
    Performing action Project Properties...[ from oracle.ide.navigator.ProjectNavigatorWindow ]
    Performing action New...[ from oracle.ide.navigator.ProjectNavigatorWindow ]
    Performing action New...[ from oracle.ide.navigator.ProjectNavigatorWindow ]
    Performing action New...[ from oracle.ide.navigator.ProjectNavigatorWindow ]
    Performing action Project Properties...[ from oracle.ide.navigator.ProjectNavigatorWindow ]
    Invoking command: [ from oracle.ide.navigator.ProjectNavigatorWindow ]
    Uncaught exception
    java.lang.StackOverflowError
    o.ji.xml.JDevXmlIntegrationUtilsImpl.canBeSelected0(JDevXmlIntegrationUtilsImpl.java:18)
    o.ji.xml.JDevXmlIntegrationUtilsImpl.canBeSelected0(JDevXmlIntegrationUtilsImpl.java:18)
    o.ji.xml.JDevXmlIntegrationUtilsImpl.canBeSelected0(JDevXmlIntegrationUtilsImpl.java:18) ......
    When I use Oracle Jdeveloper 10g (10.1.3.4.0) , I can use it to set Libraris.
    I have a swing application need these operation.
    Does anyone can tell me what's the reason?
    Thanks.
    I had tried Oracle JDeveloper 11g R1 (11.1.1.1.0)(Build 5407).
    It is OK.
    Maybe I need to download Oracle JDeveloper 11g (11.1.1.2.0) again.
    Edited by: [email protected] on 2010-2-24 下午4:58
    Edited by: [email protected] on 2010-2-25 下午5:47

    I am encountering the same bug / problem right now.
    Anybody from Oracle who has a workaround for this BUG?
    We are migrating to JDev 11.1.1.2.0 for a client and this bug is still there!
    Any help from the JDev team is highly appreciated!

  • Oracle JDeveloper 11g - Technical Preview 3 - SEVERE: FAILED_IN_CONFIG

    Hi
    I have installed "Oracle JDeveloper 11g - Technical Preview 3" and build simple ADF application.
    When I am trying to run it is giving me below error.
    Apr 4, 2008 1:02:50 PM oracle.j2ee.xml.XMLMessages warningException
    WARNING: Exception Encountered
    Apr 4, 2008 1:02:53 PM oracle.oc4j.util.SystemLog log
    SEVERE: Server start failed processing configuration
    java.security.AccessControlException: access denied ( CredentialAccessPermission credstoressp.credstore.default.systemuser read)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
         at java.security.AccessController.checkPermission(AccessController.java:427)
         at oracle.security.jps.util.JpsAuth$AuthorizationMechanism$3.checkPermission(JpsAuth.java:256)
         at oracle.security.jps.util.JpsAuth$Diagnostic.checkPermission(JpsAuth.java:180)
         at oracle.security.jps.util.JpsAuth$AuthorizationMechanism$6.checkPermission(JpsAuth.java:280)
         at oracle.security.jps.util.JpsAuth.checkPermission(JpsAuth.java:315)
         at oracle.security.jps.util.JpsAuth.checkPermission(JpsAuth.java:338)
         at oracle.security.jps.internal.credstore.util.CsfUtil.checkPermission(CsfUtil.java:527)
         at oracle.security.jps.internal.credstore.ssp.SspCredentialStore.getCredential(SspCredentialStore.java:412)
         at oracle.security.jps.fmw.util.JpsFmwUtil.findSystemUser(JpsFmwUtil.java:218)
         at oracle.security.jps.fmw.JpsUserManager.init(JpsUserManager.java:235)
         at oracle.security.jps.fmw.JpsUserManager.<init>(JpsUserManager.java:247)
         at oracle.security.jps.fmw.JpsUserManagerFactory$JpsUserManagerFactoryI.create(JpsUserManagerFactory.java:252)
         at com.evermind.server.deployment.UserManagerConfig$JAZN.construct(UserManagerConfig.java:635)
         at com.evermind.server.deployment.UserManagerConfig.delegatee(UserManagerConfig.java:253)
         at com.evermind.security.IndirectUserManager.getAdminUser(IndirectUserManager.java:126)
         at com.evermind.security.IndirectUserManager.getAdminUser(IndirectUserManager.java:126)
         at com.evermind.server.XMLApplicationServerConfig.setPassword(XMLApplicationServerConfig.java:3157)
         at com.evermind.server.XMLApplicationServerConfig.<init>(XMLApplicationServerConfig.java:244)
         at com.evermind.server.ApplicationServer.createConfig(ApplicationServer.java:648)
         at oracle.oc4j.server.ServerFactory$Worker.prepareConfig(ApplicationServerFactory.java:201)
         at oracle.oc4j.server.ServerFactory$Worker.start(ApplicationServerFactory.java:220)
         at oracle.oc4j.server.ServerFactory$Worker.run(ApplicationServerFactory.java:235)
         at java.lang.Thread.run(Thread.java:595)
    Apr 4, 2008 1:02:53 PM oracle.oc4j.util.SystemLog logNoStack
    SEVERE: Server exiting: ApplicationServer entered state FAILED_IN_CONFIG
    Process exited with exit code 1.
    Could you please somebody let me know is there any setups I need to do before I use the Jdeveloper?
    Regards
    Kiran

    The FAILED_IN_CONFIG may be caused because the JDEV project you are attempting to run is using an incompatible adf-config.xml file, I.e. one that was checked in from a previous jdev build.
    I received this error after checking out from main and opening a project in build 28, that was checked in as working in build 27.
    To solve the issue, you have to checkout into a new workspace, start the project in the build you want, delete and recreate the adf-config.xml file and re-check it in.
    1. cd ~/jdevhome
    2. scs makeworkspace workspace <newWorkingDir> rule latest --product <application>
    3. Start JDEV
         jdev fusiondrop5primeb28 <newWorkingDir>
    4. connect to CVS
    5. check out module
    6. Close JDEV
    7. Delete adf-config.xml
         >find . –name adf-config.xml
         >rm mywork/<yourapp>/<LBA>/.adf/META-INF/adf-config.xml
    8. start jdev
    9. re-add the Passwords to the database connection(s)
    10. start your project
    11. commit the new adf-config.xml and connections.xml files
    12. merge into main

Maybe you are looking for

  • Start or Stop expression at a given frame?

    hello to everyone on the support forum. I searched the forum but wasn't able to find anything quite good for resolving the matter. This is something that my IT group Charles Stinson, Nick Carangi, and Sandra Connor have been working on fixing for a w

  • Steps to upgrade and move server and home folders to new box

    Hi All, Can anyone outline the steps I should take to move my 1200 users from a G4 PowerMac Server 10.4.11 to an Intel Mac 10.5.6 and move home folders to a new drive on the new box? Can it be as simple as using the migration tool and connecting up t

  • After Effects CC won't connect to Dynamic link

    Hello, I am getting an error when starting After Effects CC saying that it can't connect to Dynamic Link.  I have read over the threads for this error, but my firewall is off I have removed the third party codecs from Library/Quicktime.  This worked

  • Enhancement for Automatic Serial Number Generation

    Hi, Has anybody worked on the enhancement iqsm0001? If so, please give me some idea on how to use this enhancement for automatic serial number generation. Thanks for your kind help. Regards, Renjith Michael.

  • Document Count when Condition is Active

    Hi Experts I have the following scenario I have a Calculated Key Figure which by formula variable *1 calculates the number documents. The count works correctly as it gives me the proper count of the documents that make up the amount on that line. Let