Named view criteria with no Assistant - I write the SQL code

Using JDeveloper/ADF 11.1.2.3.
Is there a way to create a view named with a SQL Select which is more complex than the wizard can write?

I know that I can write the code to create a view of the criteria when running, but then I can't just drag and drop it as a class one.

A use case:
I have a table named FACILITIES, with a secondary table named FACILITY_SERVICES. I want a display criteria for FACILITIES which found all facilities with all the services required in a connection variable is a comma-delimited list.
WHERE list.to_vc_array(:requiredServices) /* I wrote this function to translate a comma delimited list to my own vc_arraytype. */
   SUBMULTISET OF 
      CAST(MULTISET ( SELECT service
                        FROM facility_services
                       WHERE facilities.facility_id = facility_services.facility_id)
           AS vc_arraytype)
With the wizard, I can't even write a simple IN the query (football match at least one of the required services), still less the more complex (correspond to ALL required services).

My blog http://tompeez.wordpress.com/2011/08/21/extending-viewcriteria-to-use-sql-contains-4/ might give you a starting point. There are some hooks that you can use to implement this. Please also check Jobineshs blog (that I mention in my blog)!

Timo

Tags: Java

Similar Questions

  • Where is View Source? How can we consider the source code of a Web site?

    Where is View Source? How can we consider the source code of a Web site?

    View the Source used to access via a drop down menu, but is no longer. Why?

    I use Firefox 24.0.

    1.) get in Firefox.
    2.) open any page you want to view the source code.
    3.) after full opening of the page "right-click" then you can see the source view of the page, click on it to see the Source of the page.
    Thank you.

  • How to write the sql command in the batch file

    Jin
    I m using oracle 9i on windows. I want to know how I can write the sql on the command file command. I want to use a batch file to use the sql like shutdowm command & start command and any select command too.
    so please tell how can I do?


    thxs

    Tried looking for what he superdba.

    Can't connect to sqlplus using sys using a batch file

    HTH
    Aman...

  • BSOD need assistance, I write the DMP file

    Hello, I have random BSOD during one day, like 4 times a day, I have seen fltmgr.sys as a problem, but I'm not sure. I write the dmp file, someone please help to undestand the problem please...

    dump file: http://www.4shared.com/file/xJejn93kba/060714-46597-01.html

    Info sys drivers: http://www.4shared.com/document/189XKlIWce/WER-581946-0sysdata.html

    Signature:
    Problem event name: BlueScreen
    Versão sistema operational: 6.1.7601.2.1.0.256.1
    Identificacao da Localidade: 1046

    Ilha de sober information o problema:
    BCCode: 50
    BCP1: FFFFFA800FAB4000
    BCP2: 0000000000000000
    BCP3: FFFFF88002692300
    BCP4: 0000000000000000
    OS version: 6_1_7601
    Service Pack: 1_0
    Product: 256_1

    MSInfo: Nome operational system Microsoft Windows 7 Ultimate
    Versão 6.1.7601 Service Pack 1 build 7601
    Other information sober o Sistema operational issues available
    Faffa Sistema operational Microsoft Corporation
    Nome sistema LORENZOFP-PC
    Faffa sistema Dell Inc.
    Modelo sistema Precision M4500
    Tipo sistema PC x 64
    PROCESSADOR Intel (r) Core i7 CPU Q 740 1.73 GHz, 1734 Mhz, 4 Nucleo (s), 8 Processador (es) Lógico (s)
    Data/versão do A15 BIOS Dell Inc., 12/05/2013
    Versão SMBIOS 2.6
    Pasta do Windows C:\Windows
    Pasta sistema C:\Windows\system32
    Device inicializacao \Device\HarddiskVolume2
    Localidade Brasile
    Camada de Abstracao of material versão = "6.1.7601.17514."
    Name of user lorenzofp-PC\lorenzofp
    Fuso Monday Hora oficial do Brasil
    Memoria física (RAM) 8.00 GB installed
    Memoria total fisica 7.99 GB
    Memoria fisica 4.14 GB available
    Memoria virtual total 16.0 GB
    Memoria virtual available 11.8 GB
    Espaço land paginacao 7.99 GB
    Land of paginacao C:\pagefile.sys

    Thank you very much.

    Very interesting journal. It seems that the pilot who seemed to be a rootkit is a false positive with a strange string. Or a rootkit is present, but we cannot detect. avastMBR crashing may be related to something else in all cases, however.

    First of all, can you please uninstall Daemon Tools Lite + alcohol?

    In addition, subsequently, c:\windows\system32\drivers\sptd.sys is listed and loaded into your list of modules; SCSI pass through Direct Host - Daemon Tools (BSOD known issues with Win 7 and 8). Please remove it as soon as POSSIBLE with the uninstall tool - http://www.duplexsecure.com/en/downloads

    Kind regards

    Patrick

  • Problem with DVD player and get the error code 19 Device Manager

    Original title: TSSTcorp CDDVDW SH - 224DB ATA device

    Windows cannot start this hardware device because its information of configuration (in the registry) is incomplete or damaged. (Code 19)

    How to fix it please Message Please please how to fix it

    Hi Emerald,

    Please contact Microsoft Community. I understand that you have a problem with the CD\DVD drive and get the error code 19 Device Manager. I've surely you will help solve this problem.

    To better understand the issue, I would like to know if you have any recent software or hardware on the computer changes before this problem?

    This problem might have occurred because of these reasons:

    1. Install or uninstall the CD or DVD recording programs.
    2. Uninstall Microsoft Digital Image.

    Try the steps listed here and see if it helps:

    I suggest you try the procedure described in article which will correct corrupted registry entries. Check if it helps.

    Your CD-ROM or DVD drive is not recognized by Windows or other programs
    http://support.Microsoft.com/kb/314060/en-us

    Note: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information on how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    Hope this information helps. Reply to the post with an up-to-date report of the issue so that we can help you further.

  • How can I write the SQL query for this requirement?

    Hello

    I have a table that looks like this:

    NAME | ANNUAL |     VALUE
    ==== | ====== | =====
    execno |     480.     000004
    step |      480.     0400
    SCNA |     480. cd_demo
    System |     480.     D47-010
    type |     480.     step
    free_text |     480.     stage 400
    rbare |     480.     RBA-1
    execno |     482. 000004
    SCNA |     482. cd_demo
    System |     482.     D47-010
    free_text |     482.     step 300
    step |          482.          0300
    type |      482.     step
    rbare |     482.     RBA-1
    execno |     483.     000001
    type |     483.     step
    rbare |     483.     rke1
    SCNA |     483.     rke10
    step |     483.     0240

    Now, say that I want to fetch ONLY annual with execno = '000004' and '400' = step and scna = "cd_demo" and system = "d47-010' and type = 'step', how to write SQL code?
    At first, it seemed like a simple writing query but I've been struggling with it for hours without success. I must admit though that I'm not strong in SQL :-)
    There, can anyone help? Please...

    Thanks in advance.

    Emmanuel

    Published by: user12138559 on October 30, 2009 03:05

    Hi, Emmanuel.

    Welcome to the forum!

    Here's a way to do what you asked:

    SELECT       doc_id
    FROM       table_x
    GROUP BY  doc_id
    HAVING       SUM (CASE WHEN name = 'execno' AND value = '000004'  THEN 1 END) > 0
    AND       SUM (CASE WHEN name = 'step'   AND value = '400'     THEN 1 END) > 0
    AND       SUM (CASE WHEN name = 'scna'   AND value = 'cd_demo' THEN 1 END) > 0
    AND       SUM (CASE WHEN name = 'system' AND value = 'd47-010' THEN 1 END) > 0
    AND       SUM (CASE WHEN name = 'type'   AND value = 'step'    THEN 1 END) > 0
    ;
    

    If you think that a WHERE clause would be used, but WHERE does apply to a single line. You need a condition that checks several rows in the same group.
    WHEN has an effect something like WHERE.

    Published by: Frank Kulash, October 30, 2009 06:26

    This solution assumes that (name, annual) is unique.

  • I have a hard drive with windows xp, ive got the activation code, but it will not accept it.

    Hey what is that I built a desktop computer and this friend gave me a hard drive with windows xp on it and he gave me the activation code, I tried in my computer and told me
    to communicate with you by telephone imed them all the information they demand and said it had been hacked and to get in touch with microsoft can yo help me please. sincerely, Mr. B Burnett.

    Hello

    You have the product key for Windows XP?

    I suggest to return the item to you and check if you have a genuine copy of Windows XP:

    How to activate Windows XP

    http://support.Microsoft.com/kb/307890

    Windows Genuine Advantage does not validate a copy of Windows XP

    http://support.Microsoft.com/kb/916247

    Genuine Windows: Frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows/help/genuine/FAQ

  • How to write the Sql values in the Application Engine

    I am trying to write dynamic sql statements in AE
    E.g.
    I have SQL n Action
    DELETE
    OF %Table(%BIND(RECNAME))
    WHERE Bind (FIELDNAME) = % (AMIT_VALUE_TO_DEL) Bind %;

    at runtime, it converts into

    DELETE
    OF PS_TABLE1
    WHERE 'EMPLID '=' AJ23;

    THE QUOTATION MARK SINGLE AROUND EMPLID IN WHERE CLAUSE CREATES PROBLEM BCZ, IT IS A COLUMN NAME, IS THERE A SOLUTION THIS?

    Add NOQUOTES to your % Bind(). For example, % (FIELDNAME, NOQUOTES) Bind.

    I must warn you however. When generating dynamic SQL, make sure that you have absolute control over the input text used to generate the SQL statement. For example, make sure that you, not a user, determines the value of RECNAME and FIELDNAME. It is too easy to create a SQL Injection flaw in converting the values entered by the user in SQL statements.

  • View criteria JDev 12.1.3 built invalid SQL

    Hello world

    It seems that in JDev 12.1.3 when a criterion for the view is created with a standard nested, generated when running query is not valid. It uses incorrectly alias upon accession of the two VO

    For example, I created two simple VO:

    ViewObj1 (SELECT 1 VO1_ID, "ViewObj1" DOUBLE TITLE):

    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="ViewObj1"
      Version="12.1.3.10.8"
      InheritPersonalization="merge"
      BindingStyle="OracleName"
      CustomQuery="true"
      PageIterMode="Full">
      <DesignTime>
        <Attr Name="_isExpertMode" Value="true"/>
      </DesignTime>
      <Properties>
        <SchemaBasedProperties>
          <LABEL
            ResId="model.views.ViewObj1_LABEL"/>
        </SchemaBasedProperties>
      </Properties>
      <SQLQuery><![CDATA[SELECT 1 VO1_ID, 'ViewObj1' TITLE FROM DUAL]]></SQLQuery>
      <ViewAttribute
        Name="Vo1Id"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.math.BigDecimal"
        ColumnType="NUMBER"
        AliasName="VO1_ID"
        Expression="VO1_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="Title"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="8"
        Type="java.lang.String"
        ColumnType="CHAR"
        AliasName="TITLE"
        Expression="TITLE"
        SQLType="CHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="8"/>
        </DesignTime>
      </ViewAttribute>
      <ViewCriteria
        Name="ViewObj1Criteria"
        ViewObjectName="model.views.ViewObj1"
        Conjunction="AND">
        <Properties>
          <CustomProperties>
            <Property
              Name="displayOperators"
              Value="InAdvancedMode"/>
            <Property
              Name="autoExecute"
              Value="false"/>
            <Property
              Name="allowConjunctionOverride"
              Value="true"/>
            <Property
              Name="showInList"
              Value="true"/>
            <Property
              Name="mode"
              Value="Basic"/>
          </CustomProperties>
        </Properties>
        <ViewCriteriaRow
          Name="ViewObj1Criteria_row_0"
          UpperColumns="1">
          <ViewCriteriaItem
            Name="ViewObj1Criteria_ViewObj1Criteria_row_0_Title"
            ViewAttribute="Title"
            Operator="STARTSWITH"
            Conjunction="AND"
            Value=""
            Required="Optional"/>
          <ViewCriteriaItem
            Name="ViewObj1Criteria_ViewObj1Criteria_row_0_ViewObj2"
            ViewAttribute="ViewObj2"
            Operator="EXISTS"
            Conjunction="AND"
            IsNestedCriteria="true"
            Required="Optional">
            <ViewCriteria
              Name="ViewObj2NestedCriteria"
              ViewObjectName="model.views.ViewObj2"
              Conjunction="AND">
              <ViewCriteriaRow
                Name="ViewObj2NestedCriteria_row_0"
                UpperColumns="1">
                <ViewCriteriaItem
                  Name="ViewObj2NestedCriteria_ViewObj2NestedCriteria_row_0_Vo1Id"
                  ViewAttribute="Vo1Id"
                  Operator="="
                  Conjunction="AND"
                  Value=""
                  Required="Optional"/>
                <ViewCriteriaItem
                  Name="ViewObj2NestedCriteria_ViewObj2NestedCriteria_row_0_Title"
                  ViewAttribute="Title"
                  Operator="STARTSWITH"
                  Conjunction="AND"
                  Value=""
                  Required="Optional"/>
              </ViewCriteriaRow>
            </ViewCriteria>
          </ViewCriteriaItem>
        </ViewCriteriaRow>
      </ViewCriteria>
      <AttrArray Name="KeyAttributes">
        <Item Value="Vo1Id"/>
      </AttrArray>
      <ViewLinkAccessor
        Name="ViewObj2"
        ViewLink="model.views.ViewLink"
        Type="oracle.jbo.RowIterator"
        IsUpdateable="false"/>
      <ResourceBundle>
        <PropertiesBundle
          PropertiesFile="model.ModelBundle"/>
      </ResourceBundle>
    </ViewObject>
    
    
    


    ViewObj2 (SELECT 1 VO1_id, VO2_ID 2, "ViewObj2" DOUBLE TITLE):

    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="ViewObj2"
      Version="12.1.3.10.8"
      InheritPersonalization="merge"
      BindingStyle="OracleName"
      CustomQuery="true"
      PageIterMode="Full">
      <DesignTime>
        <Attr Name="_isExpertMode" Value="true"/>
      </DesignTime>
      <Properties>
        <SchemaBasedProperties>
          <LABEL
            ResId="model.views.ViewObj2_LABEL"/>
        </SchemaBasedProperties>
      </Properties>
      <SQLQuery><![CDATA[SELECT 1 VO1_id, 2 VO2_ID, 'ViewObj2' TITLE FROM DUAL]]></SQLQuery>
      <ViewAttribute
        Name="Vo1Id"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.math.BigDecimal"
        ColumnType="NUMBER"
        AliasName="VO1_ID"
        Expression="VO1_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="Vo2Id"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.math.BigDecimal"
        ColumnType="NUMBER"
        AliasName="VO2_ID"
        Expression="VO2_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="Title"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="8"
        Type="java.lang.String"
        ColumnType="CHAR"
        AliasName="TITLE"
        Expression="TITLE"
        SQLType="CHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="8"/>
        </DesignTime>
      </ViewAttribute>
      <AttrArray Name="KeyAttributes">
        <Item Value="Vo2Id"/>
      </AttrArray>
      <ResourceBundle>
        <PropertiesBundle
          PropertiesFile="model.ModelBundle"/>
      </ResourceBundle>
    </ViewObject>
    
    
    

    and created a link that joins the two on VO1_ID.

    Finally, I created a display criteria in ViewObj1:

    <ViewCriteria
        Name="ViewObj1Criteria"
        ViewObjectName="model.views.ViewObj1"
        Conjunction="AND">
        <Properties>
          <CustomProperties>
            <Property
              Name="displayOperators"
              Value="InAdvancedMode"/>
            <Property
              Name="autoExecute"
              Value="false"/>
            <Property
              Name="allowConjunctionOverride"
              Value="true"/>
            <Property
              Name="showInList"
              Value="true"/>
            <Property
              Name="mode"
              Value="Basic"/>
          </CustomProperties>
        </Properties>
        <ViewCriteriaRow
          Name="ViewObj1Criteria_row_0"
          UpperColumns="1">
          <ViewCriteriaItem
            Name="ViewObj1Criteria_ViewObj1Criteria_row_0_Title"
            ViewAttribute="Title"
            Operator="STARTSWITH"
            Conjunction="AND"
            Value=""
            Required="Optional"/>
          <ViewCriteriaItem
            Name="ViewObj1Criteria_ViewObj1Criteria_row_0_ViewObj2"
            ViewAttribute="ViewObj2"
            Operator="EXISTS"
            Conjunction="AND"
            IsNestedCriteria="true"
            Required="Optional">
            <ViewCriteria
              Name="ViewObj2NestedCriteria"
              ViewObjectName="model.views.ViewObj2"
              Conjunction="AND">
              <ViewCriteriaRow
                Name="ViewObj2NestedCriteria_row_0"
                UpperColumns="1">
                <ViewCriteriaItem
                  Name="ViewObj2NestedCriteria_ViewObj2NestedCriteria_row_0_Vo1Id"
                  ViewAttribute="Vo1Id"
                  Operator="="
                  Conjunction="AND"
                  Value=""
                  Required="Optional"/>
                <ViewCriteriaItem
                  Name="ViewObj2NestedCriteria_ViewObj2NestedCriteria_row_0_Title"
                  ViewAttribute="Title"
                  Operator="STARTSWITH"
                  Conjunction="AND"
                  Value=""
                  Required="Optional"/>
              </ViewCriteriaRow>
            </ViewCriteria>
          </ViewCriteriaItem>
        </ViewCriteriaRow>
      </ViewCriteria>
    
    
    

    At run time, when searching on an attribute in the nested criteria (ViewObj2), I get: ORA-00904: "QRSLTSQ1." "' VO1_ID ': invalid identifier.

    The query that is executed is:

    SELECT *
    FROM
      (SELECT 1 VO1_ID,
        'ViewObj1' TITLE
      FROM DUAL
      ) QRSLT
    WHERE ( ( (EXISTS
      (SELECT *
      FROM
        (SELECT 1 VO1_id, 2 VO2_ID, 'ViewObj2' TITLE FROM DUAL
        ) QRSLTSQ2
      WHERE ( (VO1_ID      = :vc_temp_1 ) )
      AND (QRSLTSQ1.VO1_ID = QRSLTSQ2.VO1_ID)
      )) ) )
    
    
    

    As you can see on line 13, it's with the help of QRSLTSQ1. VO1_ID when he is recommended to use QRSLT. VO1_ID.

    I'm doing something wrong? If not, is there a fix or a workaround for this bug?

    Thank you

    Bill

    It seams to be a strange behavior in the 12.1.3 sql builder. In this post VC Jdeveloper application encapsulating a user has reported something similar. He found a work around (last post of the thread) that you can try.

    Anyway, if thre is a fix available for what you ha vet oask support.oracle.com (paid support contract). They are the only ones who can tell you if it's a bug, after all, and if a fix is available. If this isn't the case, you can request a.

    Timo

  • How to write the SQL without using dynamic SQL?

    How can you write this under SQL without using execute immediately?

    You can use static SQL (using something like a CASE statement)?

    test procedure (one in varchar2, b number, each number) is

    v_num_recs pls_integer;

    Start

    Select count (*)

    in v_num

    FROM table1

    where

    col1 = one and

    If b is not null then col2 = b

    If c is not null then col3 = c;

    / * i.e. If b is not null, where condition to add this line only. If c is not null, where condition should add only this line. OR condition No. it * /.

    dbms_output.put_line (v_num);

    end;

    Or should I use dynamic SQL statements for this?

    I was wondering if the two are NOT NULL? Well check this.

    Select count (*) in v_num

    table

    where col1 = one

    and col2 = (CASE WHEN (b is not null) THEN b ELSE END col2)

    and col3 = (CASE WHEN (c is not null) THEN ELSE END col3 c)

  • Please help me to write the plsql code

    Hello

    Please help me to write a program to retrieve the empno in plsql table and update the salary up 10% to help "for all" and handle exceptions using predefined '% bulk_exception' attribute. I asked today by the interviewer. Please help me

    Name of the table: emp

    emp_no ename sal
    100 John 5000
    101 3000 miller
    102 roy 3500
    104 tom 2000

    Published by: Anill Sep 8, 2012 22:17

    Anill says:
    Hi Biju,

    I agree what you say to the workout. Please do not treat it as laziness. I have no knowledge on 'for all' and bulk_exception attributes. So, I asked help to learn and gain some knowledge.

    Published by: Anill Sep 8, 2012 22:39

    This?

    declare
    type test is table of varchar2(2000);
    v_array test;
    l_err_cnt number;
    l_errors exception;
    pragma exception_init(l_errors,-25000);
    begin
    select empno bulk collect into v_array
    from emp;
    forall i in v_array.first..v_array.last save exceptions
    update emp set sal=sal+((sal/100)*10)
    where empno=v_array(i);
    exception
    when l_errors then
    l_err_cnt := sql%bulk_exceptions.count;
    for i in 1..l_err_cnt loop
    dbms_output.put_line('error: ' || i ||  --Handle Proper Error log table
    ' array index: ' || sql%bulk_exceptions(i).error_index ||
    ' message: ' || sqlerrm(-sql%bulk_exceptions(i).error_code));
    end loop;
    end;
    

    Talk to interview if we use in bulk collect, it consumes more memory PGA. then say do it in pure SQL.
    If they want to manage the DML ERRORS and then tell them that I will use DBMS_ERRLOG. CREATE_ERROR_LOG ('table_name')

  • How can I write the SQL for this result?

    Hello my dear,
    Here first of all the script.
    CREATE TABLE ACC_TEST(
    AD_ID NUMBER,
    AD_NAME VARCHAR2(50),
    AD_SPM_ID NUMBER);
    /
    the data are
    Insert into ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) values (136,'Saleh Ahmed',129);
    Insert into ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) values (142,'Hamidur Rahman',136);
    Insert into ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) values (124,'Jasim Uddin',null);
    INSERT INTO ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) VALUES (129,'Sazib',124);
    I need the following result, when passing a value of Ad_Id. For example I go to 142 then result must be
    Select Ad_Id,Ad_Name
    From..
    ...
    where ad_id=142
    
    Ad_Id   Ad_Name
    136     Saleh Ahmed
    129     Sazib
    124     Jasim Uddin
    
    If I Pass Ad_Id=136 Then Result Should Be
    Ad_Id   Ad_Name
    129     Sazib
    124     Jasim Uddin
    
    
    If I Pass Ad_Id=129 Then Result Should Be
    Ad_Id   Ad_Name
    124     Jasim Uddin 
    Database 10 G XE

    Any help will be useful

    Hello

    HamidHelal wrote:
    WoW! You are totally my point. How do you understand that? l

    Guess luck. Guessing is generally not the best way to solve problems. It is generally faster and more reliable to say exactly what you want, as well as give an example.

    fallen little more that I want to know, if I want to restrict the output not more then 2, which would be sql?

    Now, you're not even giving for example!
    Maybe you want something like this:

    SELECT     ad_id
    ,     ad_name
    FROM     acc_test
    WHERE     LEVEL     BETWEEN 2 AND 3          -- Changed
    START WITH     ad_id     = :target_ad_id
    CONNECT BY     ad_id     = PRIOR ad_spm_id
    ;
    

    which will show just the mother and grandmother of the given line.

    I work with the developer of forms a lot. Knowledge of SQL is like sql oracle (9i cerfitication) book. But this type of sql is not available here.
    where can I learn this type of sql? SQL different then regular?

    Certification is another matter entirely.
    There are books and web sites dealing with more advanced techniques. Sorry, I don't know any good enough to recommend. Some authors (such as Tom Kyte) are always good.

    Here are a few sites that explain CONNECT BY queries:
    http://www.adp-GmbH.ch/ora/SQL/connect_by.html
    http://www.oradev.com/connect_by.jsp

  • Need help to write the SQL query

    Hello
    Please help me to write a query. My requirement is as below.

    Hello
    I have a table say XYZ in the following format.

    product_id local min_order_quntity
    ========================================
    1 en 10
    1 ch 10
    2 en 20
    2 ch 20
    3 en 30
    3 ch 30
    4 en 40
    4 NC 10

    Now I want to find the product_id where min_order_quantity is different for cn and locale

    now I want the result of the following

    product_id local min_order_quantity
    =============================================
    4          en          40
    4 ch 10

    This is different for local in and cn for product_id 4 min_order_quantity

    min_order_quantity should be the same for both the locale(en,ch) for any product_id.

    I want to find the product_id where min_order_quantity is different for ch and fr local

    Thank you..

    Hello

    This query should do the job

    select * from xyz t1
    where exists ( select 1 from xyz t2 where t2.product_id = t1.product_id and
                   t2.locale != t1.locale and t2.min_order_quantity != t1.min_order_quantity );
    

    See you soon

  • Write the VBA code or cmd to refresh essbase planning app db

    Hi all

    Someone trying to write VBA code or cmd to refresh essbase planning app db?

    OS: Windows 2003
    Planning version: 921
    Essbase EAS:921

    All auto refresh essbase db planning app ideas?

    THX

    Hello

    There is a CubeRefresh.cmd utility which refreshes planning to Essbase. You can find it in planning > Bin directory (whose location varies depending on which version you use). Take a look at the doc to help below:

    [http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_hp_admin/frameset.htm?ch11s06s01.html]

    Hope this helps
    Stuart

  • I'm very frustrated with Windows Update after receiving the error code 80070005

    After receiving the error code 80070005 for these last months.  I tried several suggested corrections but have not been able to get updates either.  My operating system is Vista Ultimate 32-Bit Windows operating system and have service pack 2 installed.  any help would be appreciated

    Hello

    As I said that it is a very difficult issue to resolve.

    Did you use all of these methods, including the last link to the other thread?

    If you have used all then possibly an InPlace upgrade/repair Installation might
    help that allows to maintain the programs and data backups although redundant
    are always a good idea.

    You can use another DVD that aren't copy protected but you you need to own
    Product key. It must be the same version 32 or 64 BIT Vista OEM. Also the system
    machine to usually sell the cheap disk since you already own Windows. Don't forget to make a
    good backup or 3 (security in redundancy).

    On-site upgrade
    http://vistasupport.MVPs.org/repair_a_vista_installation_using_the_upgrade_option_of_the_vista_dvd.htm

    This tells you how to access the System Recovery Options and/or a Vista DVD
    http://Windows.Microsoft.com/en-us/Windows-Vista/what-happened-to-the-recovery-console

    How to perform a repair for Vista Installation
    http://www.Vistax64.com/tutorials/88236-repair-install-Vista.html

    =====================================

    If nothing works then, you can use BING or Google and search for all types of suggestions
    many whom will be totally false.

    Perhaps the best choice is a new installation. You can use copy and paste to the backup
    the data on CD, DVD, or USB drives.

    I hope this helps.

Maybe you are looking for