problem in wrraping pl/sql?

Hello experts, I am trying to generate wrpped function from pl/sql in following way:
DECLARE
  l_source  VARCHAR2(32767);
  l_wrap    VARCHAR2(32767);
BEGIN
  l_source := 'CREATE OR REPLACE FUNCTION CREATE_WRAPPED_TEST RETURN VARCHAR2 AS' ||
              'BEGIN ' ||
              'RETURN TO_CHAR(SYSDATE, ''DD-MON-YYYY''); ' ||
              'END;';

  sys.DBMS_DDL.create_wrapped(ddl => l_source);
END;(code}
SELECT text
2 FROM user_source
3 WHERE name = 'CREATE_WRAPPED_TEST ';
output: no row is selected

oracle database 10g..
please suggest to resolve the problem                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

Hello

I think that there is an error of creation of the function. In the first line you lack a space (after AS) then the function will be ASBEGIN, which is not valid.

Herald tiomela
http://htendam.WordPress.com

Tags: Database

Similar Questions

  • Problem with the microsoft SQL server installation 2016

    When I'm tryig to install MICROSOFT SQL SERVER MANAGEMENT STUDIO 2016 his watch an error like

    [8:21 TO 8 19(D)] [2015 12-14 T 13: 46:06] e000: MainViewModel.OnBundleAction: Bundle action failed

    What to do to solve this problem. ?

    Hello

    Your question is beyond the scope of this community.

    Please repost your question in the SQL Server TechNet Forums.

    https://social.technet.Microsoft.com/forums/SQLServer/en-us/home?category=SQLServer

    See you soon.

  • Problem building java pl/sql package

    Hello

    In JDeveloper (11.1.1.6) I'm having a problem of java generation from a pl/sql package. When I'm in the database browser I click with the right button on the package and select "generate java. Which produces java files, some sqlj files and a < package_name > .javatmp file. When a colleague doing the same thing all the files are generated with the .java extension. Can someone tell me what I can do to build all the java files?

    Thank you

    Graeme

    It turns out that I was running against a 64 bit JDK. (1.6.0_41.)

    When that face a 32 bit JDK (also 1.6.0_41), I've changed my problem disappeared.

    It might be interesting to note that my machine is 64-bit.

  • What is the problem with this pl/sql code?

    What is the problem with this statement of the cursor? I am getting PLS-00341 error for her:
    CURSOR cur_rsource(p_sql_stmt IN VARCHAR2) IS
            SELECT plan_table_output FROM v$sql s, table(dbms_xplan.display_CURSOR(s.sql_id, s.child_number)) t WHERE sql_text LIKE '''%'||p_sql_stmt||'%''';
    How to solve this problem?

    Thank you

    Published by: PhoenixBai on December 14, 2009 14:05

    I don't have time right now to study exhaustively, but for me his vomit ORA-00942 table or view does not exist on this line:

        SELECT sql_id, child_number into tmp_sql_id, tmp_child_number
             from v$sql where sql_text like sql_statement||'%' and sql_text not like '%v$sql%';
    

    I am able to select from v$ sql in normal SQL as user I am compiling as, so don't know why it's complaing.

    Anyone know if there are certain restrictions on access to the views v$ through PL/SQL?

    EDIT: http://www.dbasupport.com/forums/showthread.php?t=22299

    Access to the views of $ v seems to be through a role - try giving explicit access to it.

    As SYS, you must grant select permissions on V_$ SQL (V$ SQL is synonymous with V_$ SQL) to your owner of the procedure. Just tested on my system and it allows him to compile.

    Published by: Cyn on December 14, 2009 10:30

  • Screen problem of refresh with SQL Developer 1.5.5 on Vista 64-bit

    I use the latest version of SQL Developer.

    I have screen refresh issues in sql developer. Scrolling up and down, the screen gets jumbled up, some screen time do any appear. Work with SQL Developer very difficult. I don't have such a problem with any of my other publishers.

    Is this something specific to Vista? Is it someone knows solution to this problem.

    Thank you

    Edited by: user5899685, 1 Sep 2009 11:14

    Specific? Not really, but judging by the posts here Vista is more likely. It usually indicates the incompatibility between Java and video drivers.
    If the update of your JDK or the video driver does not work or is not an option, just disable DirectDraw in \sqldeveloper\bin\sqldeveloper.conf generally also works:

    AddVMOption - Dsun.java2d.noddraw = true

    Hope that helps,
    K.

  • problems with my dynamic sql statement

    Hello

    I'm not a pl/sql developer, but just trying to write a simple piece of pl/sql code. My intentions are simple. I want to find all tables with a specified column name, with a specific value in that column. Also, I just want to print these tables which have information in them.

    I have read the documentation on oracle to find this information, but I can't seem to get this to work, and I don't see what my problem...

    Here is the code I wrote.

    declare

    number of v_number;
    sql_statement varchar2 (200);

    cursor pick_table is
    Select the table table_name from user_tab_columns
    where upper (column_name) = upper ('md_file_id');

    Start
    because me in pick_table
    loop

    sql_statement: = ' SELECT count (*) from "| i.table_name | 'where md_file_id = 22410';
    dbms_output.put_line (sql_statement);
    EXECUTE IMMEDIATE sql_statement in v_number;
    dbms_output.put_line ('number' | v_number);

    If v_number > 0
    then
    dbms_output.put_line (i.table_name);
    end if;

    end loop;
    end;
    /

    This works perfectly well if I try not to insert the table_name dynamically using i.table_name and a writing of the database table names in the select statement. It runs also fine if I take "v_number" information on my execute immediate command.
    Of course I can't do it with logic I.

    What is happening is that the procedure is pretending to hang himself.

    I'd appreciate any help that can be given.

    Thanks in advance

    user10869417 wrote:
    ...
    What is happening is that the procedure is pretending to hang himself.

    It doesn't seem to be anything wrong with your code. It seems that you have:

    has a lot of tables in your schema with the column MD_FILE_ID (perhaps having value 22410), or
    (b) you have only a few tables but huge with this column

    In my test with only 1 db such table, your PL/SQL block is running almost instantly:

    test@XE>
    test@XE> --
    test@XE> drop table t;
    
    Table dropped.
    
    test@XE> create table t as
      2  select 22410 md_file_id from dual;
    
    Table created.
    
    test@XE>
    test@XE> set timing on
    test@XE>
    test@XE> @test.sql
    test@XE> declare
      2    v_number number;
      3    sql_statement varchar2(200);
      4    cursor pick_table is
      5      select table_name from user_tab_columns
      6      where upper(column_name) = upper('md_file_id');
      7  begin
      8    for i in pick_table
      9    loop
     10      sql_statement := 'SELECT count(*) from ' || i.table_name || ' where md_file_id = 22410';
     11      dbms_output.put_line(sql_statement);
     12      EXECUTE IMMEDIATE sql_statement into v_number;
     13      dbms_output.put_line('count returned ' || v_number);
     14      if v_number > 0
     15      then
     16        dbms_output.put_line(i.table_name);
     17      end if;
     18    end loop;
     19  end;
     20  /
    SELECT count(*) from T where md_file_id = 22410
    count returned 1
    T
    
    PL/SQL procedure successfully completed.
    
    Elapsed: 00:00:00.33
    test@XE>
    test@XE>  
    

    which means that if you wait long enough, the pl/sql block will reach eventually up to completion.

    isotope

  • Problem loading table in SQL server

    Hello

    I'm trying to load a table in SQL server from another instance of SQL server.

    I defined the physical and and stores of data, logical and reverse engineered models to retrieve tables.

    The target table has been created manually...

    If I try to launch the interface I get the fololowing error


    ODI-1227: SrcSet0 (load) task fails on the source of connection MICROSOFT_SQL_SERVER data WAREHOUSE.
    Caused by: java.sql.SQLException: incorrect syntax [FMWGEN] [SQLServer JDBC Driver] [SQL Server] about ' < '.
    at weblogic.jdbc.sqlserverbase.ddb_.b (unknown Source)
    at weblogic.jdbc.sqlserverbase.ddb_.a (unknown Source)
    at weblogic.jdbc.sqlserverbase.ddb9.b (unknown Source)
    at weblogic.jdbc.sqlserverbase.ddb9.a (unknown Source)
    at weblogic.jdbc.sqlserver.tds.ddr.v (unknown Source)
    at weblogic.jdbc.sqlserver.tds.ddr.a (unknown Source)
    at weblogic.jdbc.sqlserver.tds.ddq.a (unknown Source)
    at weblogic.jdbc.sqlserver.tds.ddr.a (unknown Source)
    at weblogic.jdbc.sqlserver.ddj.m (unknown Source)
    at weblogic.jdbc.sqlserverbase.ddel.e (unknown Source)
    at weblogic.jdbc.sqlserverbase.ddel.a (unknown Source)
    at weblogic.jdbc.sqlserverbase.ddde.a (unknown Source)
    at weblogic.jdbc.sqlserverbase.ddel.v (unknown Source)
    at weblogic.jdbc.sqlserverbase.ddel.r (unknown Source)
    at weblogic.jdbc.sqlserverbase.ddde.execute (unknown Source)
    at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:163)
    at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
    at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
    at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)
    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)
    at java.lang.Thread.run(Thread.java:662)

    He tries to run the following SQl and I don't know why she strives to drop and create a view in the source system? The interface that I do turn above has only one source of target mapping...

    Delete the < Undefined > view. SQLDATAWH_DATAWAREHOUSEAccountDim

    Indications will be useful...

    Thanks in advance...

    Whirlpool says:
    Can you please let me know the name of the lkm and ikm which must be selected for SQL SERVER to SQL SERVER.

    You can see this
    http://docs.Oracle.com/CD/E23943_01/integrate.1111/e12644/ms_sqlserver.htm#BGBJBGCC

  • Problem loading xml using sql loader file

    I am trying to load data into the table test_xml (xmldata XMLType)

    I have an xml file and I want any file to load in a single column

    When I use the following control file and run from the command-line as follows
    sqlldr $1@$TWO_TASK direct control=$XXTOP/bin/LOAD_XML.ctl = true; :

    DOWNLOAD THE DATA
    INFILE *.
    TRUNCATE INTO TABLE test_xml
    XmlType (XMLDATA)
    FIELDS
    (
    tank fill ext_fname (100),
    XMLDATA LOBFILE (ext_fname) COMPLETED BY expressions of folklore
    )
    START DATA
    U01/appl/apps/apps_st/appl/XXTop/12.0.0/bin/file. XML

    the file is loaded in the table perfectly.

    Unfortunately I can't hard-code the name of file as file name will be changed dynamically.

    so I removed the block

    START DATA
    U01/appl/apps/apps_st/appl/XXTop/12.0.0/bin/file. XML

    control file and tried to run by giving the following command line path

    sqlldr $1@$TWO_TASK control=$XXTOP/bin/LOAD_XML.ctl direct data=/u01/APPL/apps/apps_st/appl/xxtop/12.0.0/bin/file.xml = true;

    But strangely it attempts to load each line of the xml file in the table instead of the whole file

    Please find the log of the program with the error

    ------------------------------------------------------------------
    Loading XML through SQL * Loader begins
    ------------------------------------------------------------------
    SQL * Loader-502: cannot open the data file ' <? XML version = "1.0"? > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file '< root >' XMLDATA field table TEST_XML
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file '< ScriptFileType >' field XMLDATA table TEST_XML
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file ' < Type > forms < / Type > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file ' < / ScriptFileType > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file '< ScriptFileType >' field XMLDATA table TEST_XML
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file ' < Type > PLL < / Type > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file ' < / ScriptFileType > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file '< ScriptFileType >' field XMLDATA table TEST_XML

    Please help me how can I load full xml in a single column using command line without Hardcoding in the control file

    Published by: 907010 on January 10, 2012 02:24

    But strangely it attempts to load each line of the xml file in the table instead of the whole file

    Nothing strange, that the data parameter specifies the file containing the data to load.
    If you use the name of the XML here, the control file will try to interpret each line of XML as being separate ways.

    The traditional approach this is to have the name of the file stored in another file, say filelist.txt and use, for example:

    echo "/u01/APPL/apps/apps_st/appl/xxtop/12.0.0/bin/file.xml" > filelist.txt
    sqlldr $1@$TWO_TASK control=$XXTOP/bin/LOAD_XML.ctl data=filelist.txt direct=true;
    
  • Encapsulate data problems when loading with sql loader

    Hi all

    I use sql loader to load data into a flat file HP UNIX.

    I find the fi the NUMBER data type or date type get wraped to the new line, the control file triggered errors.

    The data looks like to (field dilimiter is |, record dilimter is ~):

    1 A87CCH | 1 A87CCH | PLAN_ACCOUNT_PROMOTION | HIR6A-1 | 20100706 06:06:24 | 1 DNE1 | DC?
    2010.7 FY1011 Promoiton | 1 A87AW0 | 1 HJEZE | Private | 20100730 00:00:00 | 00 20100710
    : 00:00 | 0 | Completed | 20100730 00:00:00 | 20100710 00:00:00 | 0 | 1 4A6PKP | TFMAAI | N
    | 0 | 0 | 0 | 0 | 0 | 0 | 1 4A6PKP | Approved | 1 8U4E-163 | 00:00:20110630 00 |
    20100708 01:45:35 | 20100707 00:00:00 | -1||| 0 | 9000 | 0 | 0 ||| 100. N | 0 | 0 | 0 | 0
    | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | N | 20110426 04:01:34 | 1 8U4E-163 | 0|||||||||
    ||||| ~


    The control file looks like:

    OPTIONS (ERRORS = 1000, DIRECT = TRUE, PARALLEL = TRUE, DATE_CACHE = 5000, discardmax = 50)
    UNRECOVERABLE
    load data
    INFILE ' / home/bs7822/leon/leon.dat' "str" ~ "»
    BADFILE ' / home/bs7822/leon/leon.bad'
    DISCARDFILE ' / home/bs7822/leon/leon.discard'
    ADD THE LEON_123456 TABLE
    FIELDS TERMINATED BY ' | '. SURROUNDED OF POSSIBLY "" "
    TRAILING NULLCOLS
    (
    X_INTERFACED_DT EXPRESSION "to_date (replace (replace (: X_INTERFACED_DT_BF, chr (10),"), Chr (13), "), 'YYYYMMDD hh24:mi:ss')", "
    X_INTERFACED_DT_BF boundfiller,
    EXTERNAL DECIMAL X_ACCRUAL_AMT,
    X_PLAN_SHIPMENT_PATTERN_ID TANK (90)
    )

    I think that replace it can treat the wrapped date. But I want to know if we can find a faster or easier way to conquer this topic since the beginning.

    Best regards

    Leon

    user12064076 wrote:
    Thank you for your response. But how to ensure that a record is in a single line? For example, to unload data with coil?

    The table has more than 100 columns.

    Best regards
    Leon

    UH... which guarantee is implemented by anyone or anything that generates the data in the first place.
    for example if I am extracting data to CSV for a customer or another application, making sure that it is 1 card per line with delimiters known etc.

    What is your own code that produces the data in the first place? If so, how are you to produce? With large amounts of data I wouldn't do it with SQL * Plus spool command, but I do with UTL_FILE within PL/SQL, or generating data in a file CLOB and spell the CLOB in a go using one of the CLOB methods available writing files.

  • Procedural problem - open cursor for SQL

    in my form, I added a procedure. It works fine in SQL, but when I try to run form it gives an error.
    Code of procedure: -.
    PROCEDURE Proc_Purchase_all IS
    BEGIN
      --------------------------------
      declare
         v_sql varchar2(4000);
         v_user varchar2(30);
         v_sep varchar2(20);
         v_cur SYS_REFCURSOR;
       pur_rec    purchase%ROWTYPE;
       begin
         for u in (SELECT * FROM ALL_TABLES WHERE OWNER LIKE 'BMP%' and table_name ='PURCHASE') loop
           v_sql := v_sql || v_sep || 'SELECT * from '||u.owner||'.purchase';
          v_sep := ' UNION ALL ';
        end loop;
        open v_cur for v_sql;
      Loop
      Fetch v_cur into pur_rec;
      Exit when v_cur%NOTFOUND;
      --DBMS_OUTPUT.PUT_LINE (PUR_REC.S_CODE||' '||Pur_rec.s_name);
      End Loop;
        close v_cur;
     end; 
      
      -------------------------------
    END;
    Error line
    Open the v_cur for v_sql; *
    Error: -.
    Has met the "V_SQL" symbol to one of the following conditions.
    Select
    Has met with the symbol of the END to one of the following conditions.
    Start the function outer package pragma procedure

    Just take a look at the forms online help located here: http://www.oracle.com/webapps/online-help/forms/10g/state?navSetId=_&navId=0

    Search after exec_sql or populate_group

    as for the procedure of database... I'm sure you know how to create a database procedure, not you? Create a procedure for data base and place the logic of your first approach (as you say it worked in SQL * more) and call this procedure of forms. But if you need to process your results (if you do are specific forms) you will certainly stick to one of the first 2 methods.

    see you soon

  • Problem connecting to Oracle SQL Developer

    Hi all

    I am trying to connect to the database from the remote computer through Oracle SQL Developer, it gives me the following error.

    Status: Faliure-Test failed: connection/o: the network adapter could not establish the connection.

    I had given the host name as the name assigned to this server, it did not work.

    Later, I tried with the IP address of the server, it worked.

    Can someone tell me how I can connect by giving the hostname instead of IP address.

    Thanks in advance,
    Vinay

    Hi Vinay,

    One way would be to add an entry in your hosts file. On windoze, you can find it in

    %SystemRoot%\System32\Drivers\Etc

    Concerning
    Peter

  • What is the problem with this PL/SQL block

    declare
    v_count integer: = 0;
    Start
    -immediate ' select count (1) in v_count of | "abc". '.table1 ';
    run immediately ' select count (1) in abc.table1 v_count;
    dbms_output.put_line ('v_count: ' | v_count);
    end;

    When I execute the pl/sql block above, I get the following error:
    ORA-00905: lack of keyword
    ORA-06512: at line 6

    What I am doing wrong?
    When I use SELECT COUNT (1) INTO v_count FROM abc.table1; (instead of the dynamic sql), it works.
    I know I can't use run immediately to SELECT, but I need to make the dynamic SQL because table1 will be developed according to several drawings.

    Would appreciate an explanation of the error above, or alternate solution (s) SQL dynamic.

    Thank you
    DECLARE
      v_count INTEGER := 0;
    BEGIN
      -- execute immediate 'select count(1) into v_count from ' || 'abc' || '.table1';
      EXECUTE IMMEDIATE 'select count(1)  from abc.table1' into v_count;
      dbms_output.put_line('v_count: ' || v_count);
    END;
    

    TEST

    DECLARE
      v_count INTEGER := 0;
    BEGIN
      -- execute immediate 'select count(1) into v_count from ' || 'abc' || '.table1';
      EXECUTE IMMEDIATE 'select count(1) from dual ' into v_count;
      dbms_output.put_line('v_count: ' || v_count);
    END;
    /
    v_count: 1
    
    PL/SQL procedure successfully completed.
    

    HTH
    SS

  • problem with html in sql - &lt; is replaced to &amp; lt;

    I have a report in portal - created within a database provider, with a similar to sql

    SELECT PRIM_ID, SEC_ID, DECODE (EMAIL_ADDRESS, NULL, NULL,'< img src=/portal/test/images/mailtos.gif border = 0 alt = "" |) EMAIL_ADDRESS
    || ""(>
    ') AS MAILTO_ICON "
    FROM test_table
    WHERE PRIM_ID =: p_id

    When the report is run, instead of the mail icon and hyper link, all the text is displayed. the source view shows that <>, and ' symbols are replaced by & lt; & gt and & quot. any idea on how to reformat the stmt sql?

    The version of the portal is 10.1.4. This used to work fine in 3.0.9

    Thanks in advance.

    Published by: user448656 on January 8, 2009 15:36

    Yes. This is due to a new security feature to display the contents of text field as text and not html by default. If I remember correctly, then its details you can read about in the troubleshooting sections for 10.1.4 or the post-upgrade tasks.

    You can fix it easily.
    Modify the report, go to the second tab (column formatting) and change the value display in the field of text in HTML format. Save the report.
    Now run it.

    hope that helps! Please update with the results.
    AMN

  • Problem of writing a sql query

    I am a Java developer and new to the database.

    Database table:

    "Authors" of the table with fieldsauthor"(Varchar2)",Code'(Varchar2)',Id' (Varchar2 ~ not a primary key, multiple records may have the same value) and 'Date_Sequence' (number). The possible values for the 'Code' could be either 'yes' or 'no '.

    Approach:

    I can choose a list of writers, say 'Yes' AYES AUTHORS with the code and the list of authors, say NOAH AUTHORS with 'No' to my web page code.

    When I submit the application, I need to retrieve all the Id, where authors AYES voted 'Yes' and authors of NOAH voted 'no '.

    I came up with the following query:

    SELECT DISTINCT ID of AUTHORS WHERE AUTHOR IN ("my AYES list selected") AND CODE = "Yes".
    INTERSECT
    SELECT DISTINCT ID of AUTHORS WHERE AUTHOR IN ("selected my list of NOAH") AND CODE = 'no '.

    Problem:

    Now, the problem being here, I recover the ID hence the sequence 'Date' is the same for the 'yes' and 'no '. Don't know how to link the Date_Sequence to both queries in the intersect clause. Any hint is appreciated.

    Thank you.

    Hello

    INTERSECT gives you the lines that exist in two subqueries, so

    SELECT ID, date_sequence FROM AUTHORS WHERE AUTHOR IN ('my selected AYES list') AND CODE = 'Yes'
    INTERSECT
    SELECT ID, date_sequence FROM AUTHORS WHERE AUTHOR IN ('my selected NOES list') AND CODE = 'No'
    

    will give you combinations of id and date_sequence, which are the same in both.

    Note that I did not SELECT DISTINCT.
    Set operations (UNION, INTERSECT and LESS) automatically give you separate lines.

    In the above query, the column id itself is not distinct. If this is what you need, try:

    WITH  intersect_subquery  AS
    (
        SELECT ID, date_sequence FROM AUTHORS WHERE AUTHOR IN ('my selected AYES list') AND CODE = 'Yes'
        INTERSECT
        SELECT ID, date_sequence FROM AUTHORS WHERE AUTHOR IN ('my selected NOES list') AND CODE = 'No'
    )
    SELECT DISTINCT id
    FROM    intersect_subquery;
    

    As always, if you post some sample data and the results that you want from this data, you will have better and faster response (s).

  • problem with using the sql provider for security authentication

    Hello..
    I m working with jDev 11g and my db is oracle, I have followed this example: http://biemond.blogspot.com/2008/12/using-weblogic-provider-as.html
    but my database is different, it is, I use one with the default data brings, (http://soadev.blogspot.com/2010/04/sqlauthenticator-simply-best.html)

    I follow the example correctly, but when I reboot my web logic, my users do not appear.

    I have to do something else?

    Published by: 908022 on 20-ene-2012 14:27

    Hello

    I would not follow blogs for this, but take a look at the documentation

    http://docs.Oracle.com/CD/E21764_01/Web.1111/e13707/ATN.htm#i1208012

    Frank

Maybe you are looking for