Query of the region gets no data found
Hi allI have a region that is of type "SQL query". This area is also a button 'apply update '. There is a validation of the page that looks up a value in a shuttle that goes off when you press 'Apply update'. Sometimes, when the button is pressed and the validation fails the region return that the no data found message as defined in the attribute for the region, other times reports page when the failure of the validation of data which has been in the region until the button is pressed just stay there, as it should.
Why I get such different results when validation fails? Why do I sometimes get "no data found" and other times I get the data in the array returned by the SQL query?
A couple of things to point out,
(1) the table gave in, the sql query will always return Row (s)
(2) the sql query is NOT dependent on the values of page defined level.
(3) the sql query is simple, similar to...
Select *.
of my_custom_table
my_column asc order
Is a global temporary table... but it is defined as "on commit preserve rows", my data must therefore be kept for my entire session, even if it wasn't, it still does not explain the sporadic "no data found", unless the APEX is somehow sometimes change the session and I'm not aware of it...
Exactly what APEX - and any other web technology using connection pooling- done.
Replace the TWG with a collection of the APEX. You can define a view of the collection to match the name of the existing table, the column names and data types.
Tags: Database
Similar Questions
-
Download of CSV using Browse point (don't get no data found error)
Hello
I use procedure below to download CSV in my table.
CSV is to have null values in some places ex: 1,.
2,0.999
3,
4,0.696
below the procedure works fine when I am downloading as CSV: 1.0
2,0.999
3.0
4,0.696.
My table is seen as two columns, and I get no data found error when downloading a CSV of null values.
I went through import data in Excel to the database table but no use...
Please help me on this.
Procedure
===========
concerningDECLARE v_blob_data BLOB; v_blob_len NUMBER; v_position NUMBER; v_raw_chunk RAW(10000); v_char CHAR(1); c_chunk_len number := 1; v_line VARCHAR2 (32767) := NULL; v_data_array wwv_flow_global.vc_arr2; BEGIN -- Read data from wwv_flow_files select blob_content into v_blob_data from wwv_flow_files where UPDATED_BY = (select max(UPDATED_BY) from wwv_flow_files where UPDATED_BY = :APP_USER) AND id = (select max(id) from wwv_flow_files where updated_by = :APP_USER); v_blob_len := dbms_lob.getlength(v_blob_data); v_position := 1; -- Read and convert binary to char WHILE ( v_position <= v_blob_len ) LOOP v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position); v_char := chr(hex_to_decimal(rawtohex(v_raw_chunk))); v_line := v_line || v_char; v_position := v_position + c_chunk_len; -- When a whole line is retrieved IF v_char = CHR(10) THEN -- Convert comma to : to use wwv_flow_utilities v_line := substr(v_line, 1, length(v_line)-2); v_line := REPLACE (v_line, ',', ':'); -- Convert each column separated by : into array of data v_data_array := wwv_flow_utilities.STRING_to_table (v_line); -- Insert data into target table EXECUTE IMMEDIATE 'insert into table_name@Schema1 (col1,col2) values (:1,:2)' USING v_data_array(1), v_data_array(2); -- Clear out v_line := NULL; END IF; END LOOP; END;
Chauvet
Published by: Chaumont on 26 September 2012 10:52
Published by: Chaumont Sep 26, 2012 22:25
Published by: Chaumont on 27 September 2012 01:58Chambers,
You can use wwv_flow_utilities.array_element to avoid any no_data_found. The function does not raise any errors. For example, for the line which only have a value of table when you wait 2, it can be useful.
EXECUTE IMMEDIATE 'insert into table_name@Schema1 (col1,col2) values (:1,:2)' USING wwv_flow_utilities.array_element(v_data_array,1), wwv_flow_utilities.array_element(v_data_array,2);
Kind regards
Christina -
Get "no data found" when I download the report
Hai...
In my application, I created a region of reports where the data are displayed... I gave 'Download' format csv... when I try to download, I could not the data in the spreadsheet "excel" his coming as no data found...
What could be the problem...
Please help me...
DavidHi David,
I've always found preferable to set the value of the element on a page using a calculation when I want him to have a starting value that does not rely on a database column.
On your two fields, set the static allocation Type of Source and remove source.
Now, on your page, click on the button create (icon +) in the section of the Page rendering calculations. Then enter the following settings:
Geographical area: item on this page
Point calculation: select your P1_STARTDATE
Calculation Point: Before header
Calculation type: SQL query
Calculation: Select TO_CHAR(SYSDATE-1,'MM/DD/YYYY') from Dual
Condition Type: Article 1 of the Expression value is NULL
Expression 1: P1_STARTDATERepeat this for your usng P1_ENDDATE Select TO_CHAR(SYSDATE,'MM/DD/YYYY') from Dual to the query
Now, when the page is loaded first, the calculation conditions are checked. As the two fields are empty, the calculations are made and items get their start values. Your application should then work ok for export.
Andy
-
How to get the query of the region "PL/SQL function body returns the query string"?
Hello
is it possible to get the query string from the region of type "PL/SQL function body returns the query string"?
I can get the definition of the region as a PL/SQL procedure, but I am interested in the returned query. I tried to write something like
< pre > v_return_query: = «...» » ;
: P49_QUERY: = v_return_query;
Return v_return_query; < / pre >
to save the return on hidden item P49_QUERY string, but it does not work. I get the error message: ERR-1002 cannot find the item for the "P49_QUERY" element ID in the application '4000 '.
Kind regards
PrzemekIf you need to make reference to a page element in the block then you can use this type of control to avoid having to use generic column names:
if apex_application.get_current_flow_sgid(:APP_ID) = apex_application.get_sgid then-- runtime :P9_SQL := vSQL;else-- design time null;end if;
But if all you want to do is capture the SQL debugging you can take all the references element in the block and use the insert statement (in a debug table) as I showed earlier.
Scott
-
How to hide the buttons when no data found!
Hi all
I created two regions
1 Serach region
2 results region.
Initially during the loading of the page with the help of hidden drive I'm Basel to hide 'areas of results' once that they clik this serach button I display area with teo translated region more buttons as buttons 'export' and 'print '.
It shows very well when there is data in the region of Reulst.
But when there is no return I displays the message "No data found" but at the same time it displays 'export' and buutons 'print '.
This button should show only when data are available in the results area.
Thank you
David...abhishek8299 wrote:
Use SQL statements (Exists) in the State and write an sql statement it.Use this
SELECT 1 FROM form1 MF,bench1 BM, participant1 PP,key1 KT WHERE MF.ENGAGEMENT_ID=BM.ENGAGEMENT_ID AND BM.ENGAGEMENT_ID =PP.ENGAGEMENT_ID AND PP.ENGAGEMENT_ID =KT.ENGAGEMENT_ID
-
hide the button if no data found in the report
Hello
I use the apex of oracle 10g 3.2
I display a report with the "print" key.
I want it if the report shows not all data that is no data found then I want to hide the "print" key.
How to do this.
Thank you
OlivierHi Olivier,.
In the "print" key condition, select the condition type as "EXIST (SQL query returns at least one row) ' copy and paste the SQL report in expression1.
Kind regards
Sagay -
How to refresh the region after inserting data by dynamic Action?
Hi friends
I use APEX 4.1. I created a form master detail and wrote an insert command in dynamic Action through which the data is inserted into the secondary table. I want to refresh the detail region as data is inserted and data must demonstrate in the detail area.
How can I do this? Help, please. I will be grateful.
Kind regards.
Hi Kam_oracle_apex,
Add real action to the existing dynamic action
Action: update
selection type: region
Region: Detail (the region that you want to refresh).
Kind regards
Jitendra
-
Bills of the AP - query gives output in the editor, but no data found when run from a workflow
Hello
I am working on a custom workflow related to invoices from the AP and I came across this very odd situation where the below query works perfectly well by operating in any PL/SQL as Toad/SQL Developer editor but when run in an Oracle Workflow custom, the query raises an exception NO_DATA_FOUND.
I set debugging instructions to capture the values of the parameters (lv_invoice_id and lv_hold_id being retrieved workflow attributes) before and after the SELECT statement and noticed that the values of the parameters are set correctly.
SELECT type
IN lv_match_type
DE ap_invoices_all aia , ap_invoice_lines_all Arnaud , ap_holds_all aha
OÙ ail . invoice_id = lv_invoice_id
ET line_type_lookup_code = "ITEM"
ET AIA . invoice_id = garlic . invoice_id
ET AHA . invoice_id = AIA . invoice_id
ET AHA . hold_id = lv_hold_id
ET ROWNUM = 1 ;
Can anyone suggest what could be wrong with that? Having spent 2 days trying to debug this but without success.
Any help would be greatly appreciated.
I added a function of the WorkflowTimeout JOB just before function which becomes the flag Match, and it worked. It appears like the workflow engine is somehow unable to assign values to the query. Putting a WAIT, he probably gave the workflow a second to assign variables with values. Seems very strange, but seems to have solved the problem. Do thorough tests to confirm that it does not break something else. Mike - appreciate all your help with this post until now. You were very prompt in answering my questions. Appreciate it.
-
SQL query for the region of the tree
Hello
I was wondering if someone is able to help me work on a SQL query, to format the data in the table required in a part of the tree... I've never used a tree and I'm fighting to get the right data (if possible).
The data in the table looks like this:
I want to put it in a tree, using level 1 level6 with a final layout that would look like this:
As you can see, the data are formatted in level6 down in the tree, but are filled in the table from level 1. Not all of the columns will be filled, so level2 for anyone 4 (France) is the equivalent of level in the tree like level6 to person 1 (Spain).
This is Apex 4.2.5
Oracle 11.2.0.3.0
Sample data:
CREATE TABLE employees ( employee VARCHAR2(100), level1 VARCHAR2(100), level2 VARCHAR2(100), level3 VARCHAR2(100), level4 VARCHAR2(100), level5 VARCHAR2(100), level6 VARCHAR2(100) ); INSERT INTO employees (employee, level1, level2, level3, level4, level5, level6) VALUES ('Person1','Team One','Recruitment','Human Resources','Fictituous Company','Murcia','Spain'); INSERT INTO employees (employee, level1, level2, level3, level4, level5, level6) VALUES ('Person2','Team Four','Testing','IT','Big Corporate','Hanover','Germany'); INSERT INTO employees (employee, level1, level2, level3, level4, level5, level6) VALUES ('Person3','Big Corporate','Hanover','Germany', null, null, null); INSERT INTO employees (employee, level1, level2, level3, level4, level5, level6) VALUES ('Person4','Brittany','France', null, null, null, null); INSERT INTO employees (employee, level1, level2, level3, level4, level5, level6) VALUES ('Person5','Team Three','Testing','IT','Big Corporate','Hanover','Germany'); INSERT INTO employees (employee, level1, level2, level3, level4, level5, level6) VALUES ('Person6','Public Relations','Government Agency','Brittany','France', null, null);
Added example given.
Hello
Apex-user wrote:
Thanks Frank, this is a good example, I can work with that! Your assumptions are correct.
A question I came, however, is that I have a data segment that comes across poorly formatted so to speak... where only the lower levels (1-2, etc.) have been filled from the bottom up.
An example of this data would be:
- INSERT INTO employees (employee, level 1, 2, level3, level4, level5, level6) VALUES ('Person7', 'One Team', 'Test', null, null, null, null);
As you can see that if you rerun the select, the test team is now duplicated, both at the level of the root in the tree as it should.
You are not sure if the sql can be adjusted to account for this, or if it's too hard?
It is obviously a question of data and I am trying to solve this separately (extracted data from another system out of my control).
Thank you!
Sorry, I'm confused.
You say that my assumptions were correct. What includes supported that "If test ' occurs under 'IT' in a row, then the extent of the 'Testing' occurs, it must be under"IT "? Right after you say that assumptions are correct, you give an example where 'Testing' occurs under 'IT' to a single line, but it is not less 'IT' to another line and where is 'One Team' under 'Testing' in a line, but is 'One Team' under 'Recruitment' in another row.
When a situation like this occurs, how you cope? Whenever you have a problem, please post the exact results you want from the given sample data, and an explanation of how you get these results. If you don't know about what would be the ideal results, or if you are flexible on the exact results, then at least give an example and explain your reasons.
Maybe you want to change the got_parent of subquery like this:
WITH unpivoted_data AS
(
SELECT *.
Employees
UNPIVOT (node_name
FOR lvl (level1 AS 1
level2 AS 2
level3 AS 3
level4 AS 4
level5 AS 5
level6 AS-6
)
)
)
got_parent AS
(
SELECT c.node_name
MIN (p.node_name) AS a parent
Of unpivoted_data c
LEFT OUTER JOIN unpivoted_data p ON p.employee = c.employee
AND p.lvl = c.lvl + 1
GROUP BY c.node_name
)
SELECT LPAD (' ' ')
2 * (LEVEL - 1)
) || Node_name AS entity
OF got_parent
START WITH parent IS NULL
Parent = node_name PRIOR CONNECTION
;
In this way, if 'Test' is current 'IT' in one line, but not under what in another line, whether under would consider the 'IT' request and not to be a root. If 'One Team' sudden 'Testing' in a line, but under "Recruitment" in another line, it will be (arbitrarily) consider it under "recruitment".
-
When you open the attachment get application not found message
When you open a web address of an email or a box announces a sign comes up and says application not found
I have no CEF put viruses in one day everything worked beforeHello
These links may help you:
http://Windows.Microsoft.com/en-us/Windows-Vista/change-your-default-Web-browser
http://Windows.Microsoft.com/en-us/Windows-Vista/change-which-programs-Windows-uses-by-default
Kind regards
Joel
-
Positioning in the region drop-down data?
I use DW CS3 on mac. I have a drop down box in the left sidebar, containing vignettes, these are links to different pages that show the enlargements of the thumbs and some details about the elements to the right of the main content. The reason for this provision is to allow the thumbs to the left that will take the sidebar, contain the size of the page and most importantly keep the enlargement and the adjacent info inches. It works very well the problem is that when you scroll through the list of thumbs and select one new page that resets the scroll bar upward to lose viewers place in the list, and defeat the purpose of the scroll bar. The viewer must then scroll down and select the following thumb, which in turn forces them to scroll again to find the next inch. Question is it possible to index the thumb list and load the scroll bar position, as he was to the last page, or preset position of the list in the pages below in the list? If you're confused, you can see at http://www.thunderbirdtrading.ca/apparelLadiesItem-86.html the top four links are connected as it's the last, now scroll the list to the guy and click on the link it brings you to this page and resets the list losing your place
If you want to go on the road to ajax there are a number of selected tutorial here for you up and running-
http://www.maxkiesler.com/2006/03/15/round-up-of-30-AJAX-tutorials/
For javascript tutorials pure ajax solution and try it - http://www.sitepoint.com/subcat/javascript , it's a long list, but the javascript 101 tutorials are probably the best place to start if you are unsure.
If you can and you are happy with the terms, the ajax solution would be the best.
PZ
-
I created an application on the site of apex oracle with the workspace that you gave me, it worked fine. I made an app to export and tried to import into my work apex 4.0, the same version that the
site of the Oracle, she imported ok without error
but when I opened the form, one of the regions said no data found, I have the same exact tablesIts pretty difficult to see the source of the problem on our side.
- You use some type of context based view
- Tables/views to fine grain Access Control (Policies)
- Your reference to the table is correct? Perhaps a synonym is pointing to the wrong schema.
- atBind name of the Variable used in a query wrong/space between / had some special characters in the name, which have been lost-out/in replaced import?
Start with the database and check the DB table/view/object used in the form.
Add a new item on process/page that uses the same query and see if its actually import some kind of question. Or try to recreate the same form again manually in the same page and see if that retrieves data when the other is not, at the same time. -
Assigning a page element in the region of the "body of function return PLSQL SQL query.
I've not been here in a long time. I like the new forum text editor!
I have a search page in my application that contains a return region of query SQL PLSQL function body. I use PLSQL to build a query based on the user entries in various page numbers (search text, serial number, year, etc.). Using PLSQL is very useful to enforce the page quickly because there are 1/2 million lines with a lot of text fields some of which are CLOB.
Users want to know how many rows were returned, but if I allow using a paging system that includes the total performance dies because ApEx has to sort through all the pages of output. Instead, I use ' line varies X to Y "without the part of" Z", and it's pretty fast. I can't use the #TOTAL_ROWS # because it does not work with this system of pagination.
So, I built a code within the region of function body PLSQL to build a second query that counts only the lines based on the input parameters. I can do this query within the region using EXECUTE IMMEDIATE and the number to an output variable. The disconnect is that I can not then assign it to a page element. If I add a statement assigned to a page element, either by
: P45_COUNT: = p_count;
or
APEX_UTIL. SET_SESSION_STATE ('P45_COUNT', p_count);
then when I submit the changes I get
ERR-1002 unable to find point item ID 'P45_COUNT' in the application '4000 '.
as if the ApEx is not looking for the item in my application, but in the application development environment. I am able to write the results to a table and then recover data in the next region. That's how I got around the problem, but it seems too complicated and unnecessary.
I wrote the following code just to illustrate the problem.
Make sense? Any ideas?
Thank you!
Bill
declare
p_sql varchar2 (32767).
p_sql_count varchar2 (32767).
p_table_count number (2);
p_count number (10);
p_instr number (10);
Start
p_sql: = q'! Select g.id, g.widget, g.year_made, g.serial!';
p_sql: = p_sql | q'! g table_g where g.status = 1!';
If: P45_YEAR_MADE is not null then
p_sql: = p_sql | q'! and $P45_YEAR_MADE = g.year_made!';
end if;
If: P45_SERIAL is not null then
p_sql: = p_sql | q'! and upper (g.serial) like '% "| Upper ($P45_SERIAL) | » %' !';
end if;
If: P45_WIDGET_SEARCH is not null then
p_sql: = p_sql | q'! and upper (g.widget) like '% "| Upper ($P45_WIDGET_SEARCH) | » %' !';
end if;
p_instr: = instr (p_sql, 'of g table_g where g.status = 1');
p_sql_count: = ' select count (g.id) of "| substr (p_sql, p_instr);
p_sql_count: = replace (replace (replace (p_sql_count, ' $P45_YEAR_MADE ',: P45_YEAR_MADE), "$P45_SERIAL", "' |: P45_SERIAL |)) ('), "$P45_WIDGET_SEARCH", "' | : P45_WIDGET_SEARCH | '''');
run immediately p_sql_count in p_count;
/ * the following
: P45_COUNT: = p_count;
gives this error when I submit the region in the development environment
ERR-1002 unable to find point item ID 'P45_COUNT' in the application '4000 '.
*/
Select count (1) in the table_sql p_table_count where app_session =: APP_SESSION.
If p_table_count = 0 then
insert into table_sql (app_session, sql_text, session_date, count) values (: APP_SESSION, p_sql_count, sysdate, p_count);
on the other
Update table_sql set sql_text = p_sql_count, session_date = sysdate, count = p_count where app_session =: APP_SESSION.
end if;
/ * the above written SQL and count of a table * /.
Return replace(p_sql,'$',':');
end;Hello
Try the suggestion of Scott in Re: how to get the query region "PL/SQL function body returns the query string"?
Andy
-
No data found error in the loop of the nested table
Hi team,
I'm working on the example to get data in a nested loop using table, but didn't get the no data below found error
DECLARE
Is of TYPE numlist array of integer;
list1 numlist: = numlist (11,22,33,44);
BEGIN
List1.Delete (2);
DBMS_OUTPUT. Put_line ("is the last element" |) List1.last | | "total elementis' | List1.Count);
List1.extend (4.3);
BECAUSE me in list1.first... List1.last loop - get ANY DATA FOUND error in this line
DBMS_OUTPUT. Put_line ('Values' | list1 (i));
end loop;
END;Could you please help me where I am wrong.
Thank you very much.
You get this error because the element 2 has been removed and in the loop, you are iterating over all the elements from 1 to 3.
To avoid this, use the type of loop below:
l_index: = names_in. FIRST;
While (l_index IS NOT NULL)
LOOP
DBMS_OUTPUT. PUT_LINE
(names_in (l_index));
l_index: = names_in. NEXT
(l_index);
END LOOP;
-
Interactive report: "no data found" when first loading
Hello
I use APEX 4.0 with Oracle 10 g r2 under Windows XP Pro SP3.
I have an interactive report and a menu with a few items to filter the report.
The problem is that the first time I load the page, the report shows "no data found", when I reboot, it works. If I navigate to another page and then I go back to the page of report, it also works.
There seems to be a problem with session state, but I can't found how do works, even using an AJAX setItemInSessionState() function.
The query depends on the values of the elements:
I've implemented on apex.oracle.com, if you find the time to take a look: http://apex.oracle.com/pls/apex/f?p=4550:1select SPAT_ID, SPAT_ACCL_NAME, SPAT_AREA_NAME, SPAT_CLASS, SPAT_NUMBER, SPAT_PT, SPAT_TYPE, SPAT_STATUS, round(SPAT_CUMUL,2) as "SPAT_CUMUL" from SPATIAL_POINTS where upper(SPAT_AREA_NAME) LIKE upper(:P3_FILTRE_AREA_NAME) AND upper(SPAT_CLASS) LIKE '%'||upper(:P3_SPATIAL_CLASS)||'%' AND upper(SPAT_NUMBER) LIKE '%'||upper(:P3_FILTRE_NUMBER)||'%' AND instr(upper(:P3_SPATIAL_POINT_VALUES),upper(nvl(SPAT_PT,' '))) > 0 AND instr(upper(:P3_SPATIAL_TYPE_VALUES),upper(SPAT_TYPE)) > 0 AND (:P3_FILTRE_ACC_NAME IS NULL AND spat_accl_name IS NULL OR CASE WHEN :P3_FILTRE_ACC_NAME = '%' THEN nvl(spat_accl_name,'_NULL_') ELSE :P3_FILTRE_ACC_NAME END = nvl(spat_accl_name,'_NULL_'))
You should get a "no data found" the first time the page loaded.
Workspace : yb202826
login : User1
password : u_s_e_r_1
application : 20588. Page 1 of the Geode
Thank you!
Yann.This problem is described here:
http://Apex.Oracle.com/pls/OTN/f?p=31517:117
Denes Kubicek
-------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Opal-consulting.de/training
http://Apex.Oracle.com/pls/OTN/f?p=31517:1
http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
-------------------------------------------------------------------
Maybe you are looking for
-
My integrated camera stops working after sleep mode to retrieve only when restarting. Any ideas? Thank you, David
-
How to hide applications purchased in iTunes?
https://support.Apple.com/nl-NL/HT201322 I found this site but it is not work. Any solution?
-
Service user profile service has no logon. User profile cannot be loaded.
I'm running Vista 64 bit only 1 acct.which is admin and when I try to log get multipoint user profile Service failed to connect. User profile cannot be loaded. How can I solve this problem?
-
BlackBerry Smartphones Dollar symbol
Whenever I hit the symbol "$" on my 8330 it shows what looks like the sign of the pound sterling. Does anyone know how to change that so the sign $ US display instead? I use the software version 4.5.0 on a curve.
-
BlackBerry Smartphones BB8330 responsible Application problem/question
OK the phone wifes (BB 8330) - now she wants enforcement Facebook. The Blackberry App World icon does not appear on his phone and the Blackberry Desktop Manager - Assistant of Application Loader does not show anything. Do I have to download to my c