Can we keep OPEN? Œuvres query in SQL Developer, but not Oracle APEX

Hi Sirini,

Just my thoughts - but if one of them is closed, I think it should be a {: identifier of the thread = 2496751} where it becomes the evasive. This one {: identifier of the thread = 2496754} (APEX!) must be the one that remains open. You do not?

My 2 cents,
Howard

.. where it becomes the elusive...

What skin? Posters he determined that he needed a semicolon at the end of the statement and that he had forgotten the INTO clause. The two are beginner errors. OP has closed the thread as answered and disappeared "Google stop" to learn more about creating queries SQL in PL/SQL. This seems resolved - at least until that back of her Googlequest with another question.

Tags: Database

Similar Questions

  • Able to connect to SQL Developer but not a toad - ORA-12154: TNS

    My workplace uses TOAD as standard SQL tool to run against Oracle, although I prefer test and use SQL developer.

    When you try to connect to a database in TOAD I get the following error

    ORA-12154: TNS: could not resolve service name

    I'm using the TNSNAMES file. ORA and I am able to connect through SQL Developer, no problem.

    Also in the same file, I'm able to connect to the other TNS names, but all just not this one it seems.

    I find it very strange, because it seems that for this name TNS one, I specifically can not connect through TOAD

    I can connect to any other AMT via TOAD, and I can connect through SQL developer

    I also tried a TNSPING and his returning in OK for the server and the connection seem just.

    I am trying to connect to an Oracle 10 g with TOAD version 8.0.0.47 Server

    Any ideas appreciated!

    I'm doing this from memory, but...

    Oracle 10g database with TOAD version 8.0.0.47
    

    I believe that your version of toad is too low for this version of Oracle. You should be able to confirm with QUEST software.

    Best regards

    mseberg

    I found the page "which versions of Oracle of Toad for Oracle support?

    https://support.quest.com/search/SolutionDetail.aspx?ID=SOL21018

    What version of Oracle 10 is the question?

    https://support.quest.com/search/SolutionDetail.aspx?ID=SOL63225&category=solutions&SKB=1

    Published by: mseberg on July 22, 2011 15:47

    My rule with Toad's (once you get past the version number), if you cannot connect using SQL, Toad will never work.

    Published by: mseberg on July 22, 2011 15:55

  • Code works correctly with sql developer but not in shapes

    Hi, formulas [32 bit] Version 6.0.8.11.3 (Production)

    INSERT INTO DEFICIENCIES 
    
    SELECT I.ITEM_ID , S.ITEM_ENG_NAME , S.ITEM_ARABIC_NAME 
    FROM ITEM_DETAIL I , STOCK S 
    WHERE I.ITEM_ID = S.ITEM_ID 
    AND I.ITEM_ID NOT IN ( SELECT ITEM_ID FROM DEFICIENCIES )
    GROUP BY I.ITEM_ID , S.ITEM_ENG_NAME , S.ITEM_ARABIC_NAME 
    HAVING MAX(EXPIRY_DATE) <= TRUNC(SYSDATE)
    OR SUM(QUANTITY) = 0 
    UNION
    SELECT E.ITEM_ID , S.ITEM_ENG_NAME , S.ITEM_ARABIC_NAME 
    FROM EXPIRED E , STOCK S 
    WHERE E.ITEM_ID = S.ITEM_ID 
    AND E.ITEM_ID NOT IN ( SELECT ITEM_ID FROM DEFICIENCIES )
    ORDER BY ITEM_ENG_NAME ;
    

    When I used it in oracle forms, I have faced

    error 103 at line 15 column 2
    encountered the symbol "order" when expecting one of the following: 
    ;return RETURNING_ adn or group havign intersect minus start union where connect 
    the symbol "group was inserted before "order" to continue
    
    

    ?

    forms not authorized such use for «insert into...» Select... Of...  ORDER BY' with order by.

    but this use can be used in a database procedure.

    write your code in a database procedure.  your code will run.

  • Why Photoshop keep opening in the workspace of beginning and not Essentials workspace since the last update?

    Why Photoshop keep opening in the workspace of beginning and not Essentials workspace since the last update?

    Hi GMinert,

    Beginning workspace is a new feature that was added in the release of CC2015.1 However, you can disable it by going to the Photoshop preferences > General > uncheck 'display space to start work '.

  • the variable name of database query to SQL Server using the Oracle database link

    Hi all

    I have an ApEx 4.1 application running on x 64 (11.2.0.1) 11g on Windows Server 2008 x 64, and I have a few points of data integration with SQL (2005 and 2008) server that I need to create. I have configured the database with dg4odbc link and it works perfectly... I can run queries on the SQL Server database without any problem using the database link.

    However, there is a scenario where the SQL Server database name is dynamic, and I need to generate on the fly in a PL/SQL block and then use it in a query dynamic SQL (all this in the ApEx). It of wherever I meet problems... when I asked the default database that is based on the ODBC connection and I don't have to specify the name of the database, no problem. But when I need access to one of the several other databases by default, I received the error "invalid table.

    It works well:* (note that 'fv' is the name of my database link)

    v_query1: = "select 'Release Date' from dbo." Schedules@FV where dbo. Annexes. "" SchedID "=: calendar";
    EXECUTE IMMEDIATE v_query1 in rel_date using the grid.




    I then take this rel_date variable, convert a varchar2 (rel_date_char), then use it as the name of the database in the following query...


    _ It returns an error(error ORA-00903: invalid table name)

    v_query2: = "select"PARTNO": rel_date_char.dbo.ProdDetails@fv where 'SchedID' =: calendar and"UnitID"=: unit"
    and 'MasterKey' =: master and "ParentKey" =: parent';

    EXECUTE IMMEDIATE v_query2 in part_number using planning, master, parent unit;



    I also tried using all of the following conditions without result:

    "select"PARTNO"of" | : rel_date_char | '.dbo. ProdDetails@fv where 'SchedID '...
    "select"PARTNO"of" | rel_date_char | '.dbo. ProdDetails@fv where 'SchedID '...
    "select"PARTNO"of" | @rel_date_char | '.dbo. ProdDetails@fv where 'SchedID '...
    "select"PARTNO"in @rel_date_char.dbo.ProdDetails @fv where 'SchedID'..."


    Is it possible to do it in PL/SQL?

    Thanks for any help!
    -Ian C.

    Published by: 946532 on July 15, 2012 19:45

    Just did a test using passthrough:

    SQL > set serveroutput on
    SQL > declare
    2 val varchar2 (100);
    3 c whole;
    4 whole nr;
    5. start
    c: 6 = dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
    7 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, "select count (*) from EMP");
    8 LOOP
    9 nr: = DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    10 output when nr = 0;
    11 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 1, val);
    12 dbms_output.put_line (val);
    13 end of loop;
    14 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    15 end;
    16.
    24576

    PL/SQL procedure successfully completed.

    SQL > declare
    2 val varchar2 (100);
    3 c whole;
    4 whole nr;
    5. start
    c: 6 = dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
    7 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, ' select count (*) from dbo.) EMP');
    8 LOOP
    9 nr: = DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    10 output when nr = 0;
    11 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 1, val);
    12 dbms_output.put_line (val);
    13 end of loop;
    14 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    15 end;
    16.
    24576

    PL/SQL procedure successfully completed.

    So all 3 ways work for me.

    Published by: kgronau on July 23, 2012 10:08

    Now, using the variables to make the selection:

    SQL > declare
    2 val varchar2 (100);
    3 c whole;
    4 whole nr;
    5 tabname varchar2 (20): = 'EMP ';
    6 ownr varchar2 (20): = "dbo."
    7 dbname varchar2 (20): = "door";
    Start 8
    c: 9 = dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
    10 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, ' SELECT count (*) FROM ': dbname: '.) ' || ownr | '.'|| tabname | ") ;
    11 LOOP
    12 nr: = DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    13 when the exit nr = 0;
    14 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 1, val);
    15 dbms_output.put_line (val);
    16 end loop;
    17 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    18 end;
    19.
    24576

    PL/SQL procedure successfully completed.

    => instead of executing the statement using the "execute Immediate" we use the PASTHROUGH package to pass the statement to SQL Server.

    Published by: kgronau on July 23, 2012 10:10

  • How export (unload) result of the query without running query on sql developer

    Hello

    I want to know how export (unload) result of the query without running query on sql developer.

    I know this way.
    1. execution of query
    2. click on "Download" on the results tab
    http://i.stack.imgur.com/CQ4Qb.jpg


    Is he available unload a query result before the race?

    No, but you can do this ask the developer SQL change however, for other users can vote and add weight to the possible future implementation.

    Kind regards
    K.

  • How to convert the hierarchical query of SQL Server (CTE) to Oracle?

    How to convert the hierarchical query of SQL Server (CTE) to Oracle?

    WITH cte (col1, col2) AS
    (
    SELECT col1, col2
    FROM dbo. [tb1]
    WHERE col1 = 12
    UNION ALL
    SELECT c.col1, c.col2
    FROM dbo. [tb1] AS c INNER JOIN cte AS p ON c.col2 = p.col1
    )
    DELETE one
    FROM dbo. [tb1] AS an INNER JOIN b cte
    ON a.col1 = b.col1

    Hello
    Something like this maybe:

    DELETE FROM dbo.tb1 a
     WHERE EXISTS (
      SELECT 1
        FROM dbo.tb1 b
      WHERE a.co11 = b.col1
          AND a.col2 = b.col2
       START WITH b.col1 = 12
      CONNECT BY b.col2 = PRIOR b.col1)
    

    Although you need to do here is to check that CONNECT it BY SELECT, returns records you wait first, then the DELETION should work too.

  • Queue in sql developer does not take into account the VALUE ECHO OFF

    I am a developer SQL 3.1.07.42 Windows 7 64 bit with java 1.7

    I have the following script very simple just to show the problem:
    SET ECHO OFF;
    SET FEEDBACK OFF;
    SET SERVEROUTPUT ON;
    SET VERIFY OFF;
    SET PAGES 0;
    SET HEAD OFF;
    
    SPOOL c:\test.sql
    SELECT 1, 2, 3 FROM DUAL;
    SPOOL OFF;
    /
    If I run into a FROG 10.6.0.42 it creates the file with
             1          2          3
    This is as expected (by me)
    If I run the same exact query in SQL Developer 3.1.07.42, it creates the file with:
    < SELECT 1, 2, 3 FROM DUAL
    1 2 3
    (the < above is actually ">" but software formatting CODE is screwing ' > ')
    but I don't want the ECHOed command to be wound. For the life of me, I can't find a way to turn off the ECHO of the queue in sql developer.
    Tried the same thing in 3.0.4 and 2.1.1 with the same (bad) result (more a few warning on some unsupported SET commands).

    Am I missing something obvious? Cause like that, control of the coil cannot be used in sql developer to generate a CSV file, for example, due to the echo command. And windows does not come with default SED so it's on. (more than my original script is integrated into a whole much broader and complex scripts and the main script, their use is run from Developer SQL as a company policy (so that everyone uses the same tool and the code runs the same for everyone))

    Any ideas/suggestions are welcome
    Thank you.

    Hello

    If you save your code

    SET ECHO OFF;
    SET FEEDBACK OFF;
    SET SERVEROUTPUT ON;
    SET VERIFY OFF;
    SET PAGES 0;
    SET HEAD OFF;
    
    SPOOL c:\testscript.log
    SELECT 1, 2, 3 FROM DUAL;
    SPOOL OFF;
    

    as a script, say C:\testscript.sql, then run from a worksheet like

    @\testscript.sql

    the output in C:\testscript.log will be

    1 2 3

    Kind regards
    Gary
    SQL development team

  • my SQL Developer does not work properly! Help

    Hello!!

    My problem here is not like I can't live or work, but it's REALLY annoying, see my SQL Developer does not take any different key of letters and the space bar, I mean, if I use the Enter key, does not alter the line, if I use the return key back isn't clear if I use F5/F9 does not execute the msec! and if the keys don't work!

    any ideas why this is happening? and if yes how do fix this problem?

    There is a well known bug but still not solved, causing this type of behavior, if you are a developer SQL 1.5.X you can work around the problem by loading the accelerators by default:

    Tools-> accelerators-> load Preset-> by default

    If you're on 2.1.X preset may be responsible for

    Tools-> preferences->-> others-> load keyboard accelerators

    2.1 this problem has not been reported so far, so if you are in 1.5.X you can consider upgrading.

  • I can't enter in gmail. Error "page is not redirecting properly" is displayed. I can access gmail on my phone and with IE, but not firefox.

    I tried to clear the cache and delete cookies from gmail, but none worked. I can access gmail from my phone and through IE but not firefox. I also use the gmail gadget to my igoogle page and it does not work either.

    Tried all that precedes, and nothing has worked. I don't think it would be though, it is a new installation of windows 7 with very little installed. I wasn't expecting to find any virus/malware. The only thing found was an adware but removing those does not solve the problem.

    Edit: Uninstall and reinstall firefox did not work either.
    Edit2: I initially deleted all cookies associated with google and it does not work. I went back and remove all cookies, and it works now. Sorry I don't know what cookie was the cause of the problem.

  • I have windows mail and can receive messages but not send, but I can't send when I go on my statement but not my e-mail account window, won't accept my password... was I get hacked or or why?

    I have windows mail and can receive messages but not send, but I can't send when I go on my statement but not my e-mail account window, won't accept my password... was I get hacked or or why?

    It seems to work now, so if my emails get screwed up again, I'll take your advice... don't understand why he sends now and am not asking my password as it does... but I don't want to do something that I don't know if it's working now... What do you think?

  • Oracle SQL Developer will not respond

    Hello:
    I'm so stressed these days as to my habit of SQL Developer' answer. When I double click the icon, logo will appear and it seems the hard drive will blink for a few seconds. After that, nothing happened. I tried several times and even downloaded another copy of SQL Developer but still no luck.
    Did anyone here have the same problem and how solve you?

    Thank you very much

    A stressed out of programmer.

    Try current enforcement \sqldeveloper\bin\sqldeveloper.exe from a command window and see if you get an output in the console.

  • Can I create a script of commands SQL Developer?

    I have a frequently repeated process where I:

    Open SQL Developer (v3.2.2 due to requirements of 32 bits),

    to connect to a database previously defined connection,

    to connect to a previously defined MS Access database connection,

    Select 3 tables in Access

    Use the context menu to copy Oracle

    Specify Append on the conflict

    and I'm done.

    I would like to automate this process. Can it be done?

    Thank you!

    There is no command line interface in version 3.2, but we don't have one in version 4.0.

    And version 4.0 does not have some of the migration features available to call from the CLI, but I do not see a "copy to oracle" action available.

  • Cannot query the SQL Developer apex_application_files

    Request Express 4.2.5

    SQL workshop

    I use a function table to analyze several files, delimited by tabs, that I downloaded and saved on the apex_application_files.  The strange thing is that when I run the following query in the SQL workshop and the schema that owns the function table, then it returns the correct results.  However, when I try to do the same on the SQL Developer as the user who owns the table function it returns no result.  A short, generic version of the base query is:

    SELECT * from apex_application_files

    Is there some kind of definition I need to put in SQL Developer, that tempt me to appear as a certain user APEX, so that I can get results when I run the above query?

    I was able to get the data I need questioning wwv_flow_file_objects$ of in SQL Developer.

  • Can you check data in a table or another, but not both in a single query?

    I have a situation where I need to connect the two tables, but the data can be in another table (archive) or different records are in both but I want the last disk in two tables:

    ACCOUNT

    AccountID name

    John Doe 123

    Jane 124 Donaldson

    125 Harold Douglas

    MARKETER_ACCOUNT

    AccountID key Marketer StartDate EndDate

    1001 123 10526 8/3/2008 9/27/2009

    1017 123 10987 9/28 / 2009 12/31/4712 (high date ~ that means currently with this Distributor)

    1023 124 10541 03/12/2010 12/31/4712

    ARCHIVES

    AccountID key Marketer StartDate EndDate

    1015 124 10526 8/3/2008 12/02/2010

    1033 125 10987 01/01/2011 01/31/2012

    If my query should return the following:

    123 John Doe 10526 8/3/2008 9/27/2009

    Jane Donaldson 10541 12/03/2010 31/12/124 4712 (that is the later of the two folders for this account between tables Archives and marketer_account)

    125 Harold Douglas 10987 01/01/2011 01/31/2012 (it is in the archives, so get this recording)

    I'm not sure how to do this in a single query.  Beware, I am possibly reading several accounts at once and return to a .net collection

    Open CURSOR_ACCT

    Select the account ID

    Of

    ACCOUNT A,

    MARKETER_ACCOUNT M.

    R OF THE ARCHIVES

    where A.AccountID = nvl ((select max (M.EndDate) of Marketer_account M2

    where M2. AccountID is A.AccountID),

    (select max (R.EndDate) in Archive R2

    where R2. AccountID = A.AccountID)

    and upper (B.SID) as a parameter. '%'

    < can you do a NVL like that?   probably not...   I want to be able to get the MAX registration for this account on the table of MarketerACcount OR recording max for this account to off the table to Archive, but not the two >

    (setting could be 'DO', so I return all names beginning with...)

    Hello

    So, you have a few lines in marketer_account and the other rows in the archives, but you do not want to treat all lines, as if it were a table, is it?

    This sounds like a job for the UNION:

    WITH union_data AS

    (

    SELECT StartDate, EndDate, Marketer, AccountID

    OF marketer_account

    UNION ALL

    SELECT StartDate, EndDate, Marketer, AccountID

    To archive

    )

    got_MaxEndDate AS

    (

    SELECT StartDate, EndDate, Marketer, AccountID

    MAX (EndDate) ON (AccountID PARTITION) AS MaxEndDate

    Of union_data

    )

    SELECT a.AccountID, B.SID

    m.Marketer, m.StartDate, m.EndDate

    One ACCOUNT

    JOIN got_MaxEndDate m ON m.AccoutnID = a.AccoundID

    WHERE m.EndDate = m.MaxEndDate

    ;

    I hope that answers your question.
    If this is not the case, after a CREATE TABLE and INSERT statements for your sample data.
    Report when the above query is the production of incorrect results and explain, using specific examples, how to get results in these places.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002#9362002

    .

    Starting with version 8, the maximum year in DATEs Oracle is 9999, not 4712.

Maybe you are looking for

  • Untrusted login page is still in place

    Like many others, I get pages of unreliable connections on all Web sites. The system clock is correct and I do not have any parental Microsoft put in place at all (when I go to the page that nothing has been set up which is irrelevant). So I don't kn

  • Satellite 1800-514-display is off every few seconds

    Yesterday, I have a Toshiba Satellite S1800-514. I have install the OS (Windows XP Home) again.Laptop screen turns off every few seconds. When I press the small button above the power switch (sensor for portable fence) there is a beep and the screen

  • 3 h 45 min of battery 65Wh life: Pro L300

    Clocked at various occasions, press the button (laptop is turned off and do not restart suspension or hibernation), laptop goes into hibernation to battery level critical 2%, using the maximum power saving mode. It comes with wifi on and surf the web

  • I select normal startup windows with my Windows XP Pro OS, but he wants to go to debug in safe mode.

    I select normal startup windows with my Windows XP Pro OS, but he wants to go to debug in safe mode.  (1) how to get back to normal?  (2) how do I change of start up of parameters in order to reduce unnecessary programs that open at startup? [Moved f

  • Connectors power cable ATA for a new disk in XPS 8500 of evil

    Hello world I am trying to add a blu ray burner to my XPS 8500. I was doing very well until you connect the power cord. The one I have has a connector 15 female pins that plugs into the drive, but the other end is a male connector 4 pins. I can not f