Bug in SQL Workshop, SQL Scripts, Results page [Apex 4.0.1.00.03]

I have some scripts that I have created to insert various rows into a table called level5. Most rows execute properly and the output shows "1 row inserted" as I would expect.
But then some others give bizarre output on the Results page. Here are a few examples (first 2 are what I would term "correct", the rest are "odd"):
1 0.27 insert into level5 (name, description, active, approver_id, 1 row(s) inserted. 1
2 0.02 insert into level5 (name, description, active, approver_id, 1 row(s) inserted. 1
33 0.02 insert into level5 (name, description, active, approver_id, Statement processed. 1
58 0.02 insert into level5 (name, description, active, approver_id, Statement processed. 1
65 0.03 insert into level5 (name, description, active, approver_id, User created. 1
633 0.05 insert into level5 (name, description, active, approver_id, Role created. 1
924 0.02 insert into level5 (name, description, active, approver_id, Role created. 1
The SQL across these various rows is identical except for some values in varchars.
Here are the corresponding sql commands:
1
insert into level5 (name, description, active, approver_id, level4_id) values ('M_SECROLE', 'Security', '1', (select id from persons where pernr='376' and active='1'), (select id from level4 where name='SD1' and level3_id=(select id from level3 where name='xyz' and level2_id=(select id from level2 where name='clienta' and level1_id=(select id from level1 where name='Application')))));
2
insert into level5 (name, description, active, approver_id, level4_id) values ('M_ADMIN', 'ADMIN', '1', (select id from persons where pernr='376' and active='1'), (select id from level4 where name='SD1' and level3_id=(select id from level3 where name='xyz' and level2_id=(select id from level2 where name='clienta' and level1_id=(select id from level1 where name='Application')))));
33
insert into level5 (name, description, active, approver_id, level4_id) values ('COLL_CREAT_RM', 'Collaboration Create Room', '1', (select id from persons where pernr='327' and active='1'), (select id from level4 where name='SD1' and level3_id=(select id from level3 where name='xyz' and level2_id=(select id from level2 where name='clienta' and level1_id=(select id from level1 where name='Application')))));
58
insert into level5 (name, description, active, approver_id, level4_id) values ('360_FEEDBACK', '360 Feedback', '1', (select id from persons where pernr='327' and active='1'), (select id from level4 where name='SD1' and level3_id=(select id from level3 where name='xyz' and level2_id=(select id from level2 where name='clienta' and level1_id=(select id from level1 where name='Application')))));
65
insert into level5 (name, description, active, approver_id, level4_id) values ('AUTO_USER_ADM', 'Automated User Admin', '1', (select id from persons where pernr='702' and active='1'), (select id from level4 where name='DD1' and level3_id=(select id from level3 where name='xyz' and level2_id=(select id from level2 where name='clienta' and level1_id=(select id from level1 where name='Application')))));
633
insert into level5 (name, description, active, approver_id, level4_id) values ('PROD_SUPPORT_CRE_INV', 'IT SRM Prod Support Role Create Invoices', '1', (select id from persons where pernr='990' and active='1'), (select id from level4 where name='PC1' and level3_id=(select id from level3 where name='xyz' and level2_id=(select id from level2 where name='clienta' and level1_id=(select id from level1 where name='Application')))));
924
insert into level5 (name, description, active, approver_id, level4_id) values ('PROD_SUPPORT_CRE_INV', 'IT SRM Prod Support Role Create Invoices', '1', (select id from persons where pernr='327' and active='1'), (select id from level4 where name='QC1' and level3_id=(select id from level3 where name='xyz' and level2_id=(select id from level2 where name='clienta' and level1_id=(select id from level1 where name='Application')))));
Basically it looks to me like the results text is somehow being affected by the text in my description colum in my SQL. This seems wrong to me, and a bug. Why don't they all just show the same "1 row inserted" text? Why do some say "statement processed"? And why the User and Role created -- that is just plain wrong!
Would you agree this is a bug??
This is on Application Express 4.0.1.00.03 in case that matters!

Hi,
Browser: Firefox 3.6.13 and IE 8.0
Template: One Level Tabs - Right Sidebar (optional / table-based)
Theme: 2. Builder Blue
Here is an application I created on http://apex.oracle.com.
http://apex.oracle.com/pls/apex/f?p=29067:1
Workspace: abc
User ID: [email protected]
Password: ssddaa05
Please look at this application and help me to get the SAL column in RED font when SAL>2000.
Thanks
Chandra.
Edited by: Chandra on Jan 11, 2011 12:38 PM

Similar Messages

  • Use SQL Workshop SQL Scripts function

    When I tried the following 5 steps,
    I cannot enter the ddl in the SQL editor window.
    The fact is that I cannot enter anything.
    Anyone can point out what is wrong with my procedure??????
    Thanks!
    Create the HT_EMP Table
    To create the HT_EMP table and the appropriate associated objects:
    1. Click SQL Workshop on the Workspace home page.
    2. Click SQL Scripts.
    3. When the SQL Scripts Repository appears, click Create.
    The Script Editor appears.
    4. In Script Name, enter HT_EMP
    5. In the Script Editor, enter the following DDL:
    CREATE TABLE ht_emp (
    emp_id NUMBER primary key,
    emp_first_name VARCHAR2(30) not null,
    emp_middle_initial VARCHAR2(1),
    emp_last_name VARCHAR2(45) not null,
    emp_part_or_full_time VARCHAR2(1) not null check (emp_part_or_full_time in
    ('P','F')),
    emp_salary NUMBER,
    emp_dept VARCHAR2(20) check (emp_dept in
    ('SALES','ACCOUNTING',
    'MANUFACTURING','HR')),
    emp_hiredate DATE,
    emp_manager NUMBER references ht_emp,
    emp_special_info VARCHAR2(2000),
    emp_telecommute VARCHAR2(1) check (emp_telecommute in ('Y')),
    rec_create_date DATE not null,
    rec_update_date date)
    /

    You need to upload the file to the SQL scripts area of ApEx. If you upload it to the static files area it's not going to be treated as a SQL script.
    Barring that as the problem - did you verify the contents of the script file on your workstation before you uploaded it - to make sure that the script actually contained the correct contents of the script?
    I've never had any significant problems with script uploads and running scripts in ApEx that couldn't be traced back to operator error. :>)
    Try explaining in detail the steps that you took to try to make this work - then we'll know where to start.
    Earl
    Message was edited by:
    Earl

  • SQL Workshop - SQL Commands - Saved SQL:  Saved set of commands

    Has any thought been given to this, or perhaps this has already been done.....
    A saved set of SQL commands as a template
    For example, when I'm in Excel and I start writing a lookup formula, a guide appears below the cell, reminding me of the format of what comes next. When I know what I'm doing, I simply ignore the guide. When I don't know what I'm doing, the guide is helpful - even linkable to more information.
    Perhaps there are too many variables here to do that....
    In the meantime, I'm creating my own 'set' as I learn - perhaps that's even better.
    Marion in NY

    Hi Kirsten,
    this could be controlled at the database level whereby you create a schema that doesn't own the objects your users are querying but has the appropriate grants and privileges made to it and synonyms or views created to represent the objects. This schema then becomes the parsing schema for the workspace you let your users use. This wont prevent them from creating update statements, but at the database level it will not allow them to be executed.
    Regards
    Andre

  • APEX - SQL Workshop - SQL Commands : Issue in extracting hour from date

    Hello All,
    When I run
    SELECT to_char(sysdate,'hh24') from DUALon SQL Developer and APEX SQL Commands window, both are returning correct hour value.
    But when I run
    SELECT to_char(i_date,'hh24') from t_factthen I'm getting correct values in SQL Developer but not in APEX SQL Commands window. In APEX, it always returns '00' for all rows. I'm totally lost what could be the issue with APEX? Any suggestions?
    DB Version: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    APEX Version: 4.0.1.00.03
    Web Server : EPG
    Table structure:
    CREATE TABLE  "T_FACT"
       (     "TF_KEY" NUMBER,
         "TOWER" VARCHAR2(20),
         "LOC_ID" NUMBER,
         "TF_CAT" VARCHAR2(35),
         "EQP_NAME" VARCHAR2(35),
         "I_DATE" DATE,
         "MON_CATEGORY" VARCHAR2(35),
         "EVENT" VARCHAR2(35),
         "UNIT" VARCHAR2(35),
         "TF_VALUE" NUMBER
       );Regards,
    Hari

    Hi,
    Just silly question case you have same table in multiple schemas:
    You run query in same schema?
    Regards,
    Jari

  • HTML DB SQL Workshop Output to csv Max Row Count

    I am using HTML DB 1.6 with Oracle 10g 10.1.0.3.0 On SuSE Linux Enterprise Server 9.
    When I execute a query in SQL Workshop SQL Command Processor that returns a result set of greater than 5,000 rows and click the Output to Excel link, it exports NO MORE than 5,000 records.
    In working through Metalink with Oracle Tech Support, apparently for Reports in HTML DB there is a way to change the Max Row Count default limitation of 5,0000. However, this isn't in a report. It is simply from the query results page in SQL Workshop. Tech Support has been unable to idnetify ANYWHERE where I can change the default Max Row Count for simply outputting the results to csv format through the Output to Excel link.
    I am desperately looking for where I can globally change this default that will allow me to use SQL Worskshop to output greater than 5,000 records from within SQL Workshop.
    Thanks for you help!
    Mike

    hi mikes--
    that sqlworkshop 5k row limit issue was corrected in htmldb 2.0. in 1.6.x, i'm pretty sure you're always limited to 5k no matter what you select for that Max Rows attribute.
    regards,
    raj

  • SQL workshop Data Model

    It seems like the data model in sql workshop (where is shows a diagram of linked tables) is very useful.
    Has anyone built anything like this in their application or is there an example out there somewhere of how it was done in the sql workshop.
    Something like this would be very useful in an application that I'm building but I'm not too sure where to start.
    Thanks!
    - Brian

    There are a ton of things in the SQL Workshop that I would love to get the "source code" behind but I am sure Oracle is not about to divulge all these intellectual property anytime soon.
    Login to my apex.oracle.com workspace at vikasa/guest/guest and review the SQL Workshop application. The page that shows the model is 2103 and 2152. It just has a PL/SQL region with an API call to draw the model diagram
    wwv_flow_table_drill.draw_data_model (
        p_owner      =>:OBJECT_OWNER,
        p_table_name =>:OBJECT_NAME,
        p_session    =>:SESSION,
        p_page       =>2103,
        p_request    =>'GETOBJECT',
        p_clear_cache=>'RP',
        p_item_oid   =>'OB_OBJECT_ID'
    );:-(

  • Oracle: SQL Workshop needs the SYSTEM MESSAGE to show up..

    Hi Oracle Dev Team,
    We have 3-4 environments as most of us do...
    DEV, TEST, UAT, PROD
    When I am in UAT SQL Workshop and then get distracted from phone call etc
    I come back and start working on a DEV issue BUT I forget I am in UAT.
    The SYSTEM MESSAGE shows up when you go to SQL Workshop area but when you go into the SQL Workshop > SQL Commands window its gone.
    also the other windows as well:
    Object Browser
    SQL Commands
    SQL Scripts
    Query Builder
    Utilities
    Any way to distinguish between environments?
    Thanks, Bill

    Hi Bill,
    We follow a standard for 'Developer Usernames' in our workplace. We always post fix environment details to our user names, like BILL_DEV, BILL_UAT etc. So if you follow similar standard, you can always point out in which environment you are, just by seeing the welcome message at upper-right corner of your screen. It's not the technical solution, but still it will serve your purpose.
    You may check-out "Background Image depending on Connection" section in following site, if it might help.
    http://builderplugin.oracleapex.info/
    Regards,
    Hari
    Edited by: Hari_639 on Jan 20, 2011 3:51 PM

  • Added Schemas can be viewed in SQL workshop but can't while creating Form

    Hi Friends
    We are using APEX 3.1 and Oracle 10.2.0 at back end.
    I can assign other schemas to a work space successfully.
    The Problem is that
    Added schemas can be viewed in SQL Workshop (SQL commands)
    But can not view the added schemas in the list when want to create a form based on table
    Regards
    Jazib

    Jazib,
    When you select an application the application's Owner attribute determines which tables/views you see in the wizard LOVs. If your application owner (parsing schema) is FOO and you want to create a form on table BAR.T then you have to grant select on BAR.T to FOO.
    Scott

  • Added can be viewed in SQL Workshop but can't when want to create form

    Hi Friends
    We are using APEX 3.1 and Oracle 10.2.0 at back end.
    I can assign other schemas to a work space successfully.
    The Problem is that
    Added schemas can be viewed in SQL Workshop (SQL commands)
    But can not view the added schemas in the list when want to create a form based on table
    Regards
    Jazib

    Closed: duplicate post.

  • Using SQL workshop

    I have a workspace with two schema and I want to copy a table from one to another
    Can this be done from within HTML_DB?

    Bjorn:
    I have two schemas in my workspace, JASON and JASON2. I have a table called EMP that I also want with all rows in JASON2. I used the steps below with the SQL Workshop SQL Commands facility.
    1) With schema JASON selected, I executed the command 'GRANT SELECT ON EMP TO JASON2'
    2) With schema JASON2 selected, I executed the command 'CREATE TABLE EMP AS SELECT * FROM JASON.EMP'
    And that does the trick.
    Regards,
    Jason

  • Run procedure from SQL Workshop Command window?

    hi, this one is simple.
    how to run a created procedure from APEX SQL Workshop SQL Command window?
    simon

    Simon,
    begin [proc_name]; end;
    -Carsten

  • Purge Sql history from sql workshop

    in APEX decelopment-->SQL Workshops--> sql commands
    you can execute sql commands.
    is there a way to purge the history?

    Hi,
    Instance admin can do that
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35129/adm_mg_service_set.htm#sthref329
    Regards,
    Jari

  • LOV shows no results, but SQL Workshop does.

    Hello,
    I am using a select list with a named LOV. The select statement returns results when executed with SQL Workshop, but when I use the named LOV with any select item it allways shows no results.
    I already checked the assigned schema and everything seems to be correct.
    Is this a bug in APEX 3.2.1 ?
    Best regards
    Tareq

    I would try a couple of things:
    1. Trying passing the query into a report region to get a better look at what it is returning - at least it will rule out a problem with LOV per se i.e. if it doesn't run as a straight report then we know its query-related.
    2. create a before header process to output the value of apex_util.get_default_schema to ensure that a valid value is returned. Something along these lines:
    begin
       wwv_flow.debug('apex_util.get_default_schema: '|| nvl(apex_util.get_default_schema,'invalid value');
    end;If you re-run the page with 'Debug' switched on, you should see if a result is returned - this may well return a different value to what you were expecting.
    On that note, obviously I have no idea what your application is trying to ultimately achieve, but I wonder if the default schema user is what you are looking for. The reason I say this is surely you would always have the same user (namely 'PUBLIC' or whatever DAD user you use to link to your oracle db) - unless you have multpile DADs and different instances referencing the same p_users_db table, I don't see how this is helpful to you.
    Edited by: JoelC on 26-Apr-2010 09:19

  • How can I architect my data layer to yield query result pages to the application as SQL Server prepares them?

    I tried to make the question as explicit as possible.
    Refer to Sql Server Management Studio's Results view.  Depending upon the structure of the execution plan, the Results pane may begin displaying results while the query is still executing.  Can someone point me in a direction for architecting a
    data layer (I am tech and framework agnostic for this task. Any solution will suffice) that will begin receiving pages of the set before SQL Server has completed the entire query?
    The call from the data layer to SQL Server will obviously have to be asynchronous, but is there any additional ceremony that I need to be aware of when issuing OPTION (FAST x) to the query optimizer?

    Thanks for the reply. (I actually meant to put this in the SQL Data Access forum, not the T-SQL forum)
    "Generally the last step is ORDER BY in a
    query, so nothing can start before that executes."
    I would imagine you cannot ORDER BY and yield results as they are fetched because of the execution plan that would be generated.  For the purposes of this post, please assume that sorting will be done purely client side
    "Can you post your query?"
     For purposes of discussion, let's assume that the query is
    select *
    from information_schema.columns
    and also assume that you have "lots" of columns to display.
    This was an exploratory question to see what would be necessary to replicate the behavior of Management Studio's Query Result view in a custom application. 
    I would imagine that there's going to be a lot of analysis of the execution plans that get generated in order for the OPTION (FAST x) optimizer hint to do any good, but apart from general tuning concerns that would allow SQL SERVER to yield a page of data
    "fast", I was wondering if there was anything else required of the calling client to force it to yield return its first page.
    After thinking about this (and phrasing it the way I did in the last sentence) perhaps this is the incorrect forum for this question.  I imagine that my concerns are better addressed in forums dedicated to the technology of the calling client (which
    would be a .NET assembly)
    Be that as it may, if there is any ceremony that SQL Server imposes on clients in order to yield return, I would expect that my question would be in the scope of SQL Server discussions (even though I intended this to be in a different SQL Server forum)

  • Looking for an SQL query to retreive callvariables + ECC from a RUN SCRIPT RESULT (Translation to VRU)

    Hi Team,
    I am looking for an SQL query to check the data (ECC + CallVariable) received following a RUN SCRIPT RESULT when requesting an external VRU with a Translation Route to VRU with a "Run External Script".
    I believe the data are parsed between the Termination Call Detail + Termination Call Variable .
    If you already have such an SQL query I would very much appreciate to have it.
    Thank you and Regards
    Nick

    Omar,
    with all due respect, shortening a one day's interval might not be an option for a historical report ;-)
    I would recommend to take a look the following SQL query:
    DECLARE @dateFrom DATETIME, @dateTo DATETIME
    SET @dateFrom = '2014-01-24 00:00:00'
    SET @dateTo   = '2014-01-25 00:00:00'
    SELECT
    tcv.DateTime,
    tcd.RecoveryKey,
    tcd.RouterCallKeyDay,
    tcd.RouterCallKey,
    ecv.EnterpriseName AS [ECVEnterpriseName],
    tcv.ArrayIndex,
    tcv.ECCValue
    FROM Termination_Call_Variable tcv
    JOIN
    (SELECT RouterCallKeyDay,RouterCallKey,RecoveryKey FROM Termination_Call_Detail WHERE DateTime > @dateFrom AND DateTime < @dateTo) tcd
    ON tcv.TCDRecoveryKey = tcd.RecoveryKey
    LEFT OUTER JOIN Expanded_Call_Variable ecv ON tcv.ExpandedCallVariableID = ecv.ExpandedCallVariableID
    WHERE tcv.DateTime > @dateFrom AND tcv.DateTime < @dateTo
    With variables, you can parametrize your code (for instance, you could write SET @dateFrom = ? and let the calling application fill in the datetime value in for you).
    Plus joining two large tables with all rows like you did (TCD-TCV) is never a good option.
    Another aspect to consider: all ECC's are actually arrays (always), so it's not good to leave out the index value (tcv.ArrayIndex).
    G.

Maybe you are looking for