No data found in sql
OK, this should be simple, but I'm stuckI'm trying to display a value when no data is found in a sql querry. similar to a nvl
but nvl does not work because no line is detected.
I don't want to do any pl/sql or defined by the user of the functions.
Thus, for example
Select nvl (to_char (level), "no_data_found") lvl
of the double
where 1 = 1
connect by level < 6
Returns the value 1 to 6 as expected
but I try to get the following statement to return the words no data found
Select nvl (to_char (level), "no_data_found") lvl
of the double
where 1 <>1
connect by level < 6
I've been playing with some of the functions of the group, but I can't very well.
I thought that something like that could be on the right track.
Select case count (*) over() when 0 then "no_data_found" another to_char (level) end lvl
of the double
where 1 <>1
connect by level < 6
Use a left join to double.
for example when he is observed data:
with tab_a AS
(
select to_char(level) AS lvl
from dual
where 1 = 1
connect by level < 6
)
select nvl(tab_a.lvl, 'no_data_dound') from dual left outer join tab_a on dual.dummy = 'X'
/
NVL(TAB_A.LVL,'NO_DATA_DOUND')
----------------------------------------
1
2
3
4
5
5 rows selected
.. .and where not found...
with tab_a AS
(
select to_char(level) AS lvl
from dual
where 1 != 1
connect by level < 6
)
select nvl(tab_a.lvl, 'no_data_dound') from dual left outer join tab_a on dual.dummy = 'X'
/
NVL(TAB_A.LVL,'NO_DATA_DOUND')
----------------------------------------
no_data_dound
1 rows selected
Tags: Database
Similar Questions
-
ORA-01403: no data found
Hello
The following procedure works fine when the select statement returns a line.
However, it creates "ORA-01403: no data found" error when no data is returned for select.
When I put the following exception after select it, It doest go inside the if block. (It stops after selection). Do not know why.
How can I set an exception for this?exception when NO_DATA_FOUND then null;
CREATE OR REPLACE PROCEDURE kill_blocking IS l_sid number(10); l_serial number(10); l_wait number(10); l_username varchar2(20); sqlStmt VARCHAR2(1000); BEGIN SELECT s1.sid,s1.serial#,s2.seconds_in_wait,s2.username into l_sid,l_serial,l_wait,l_username FROM v$lock l1, v$session s1, v$lock l2,v$session s2,v$sql sqlt1, v$sql sqlt2 WHERE s1.sid =l1.sid AND s2.sid =l2.sid AND sqlt1.sql_id= s2.sql_id AND sqlt2.sql_id= s1.prev_sql_id AND l1.BLOCK =1 AND l2.request > 0 AND l1.id1 = l2.id1 AND l2.id2 = l2.id2; if l_username='APP' and l_wait > 100 then sqlStmt := 'ALTER SYSTEM KILL SESSION ''' || TO_CHAR(l_sid) ||',' || TO_CHAR(l_serial) ||'''' ; dbms_output.put_line( sqlStmt ); EXECUTE IMMEDIATE sqlStmt; END IF; END; /
Check this box
SQL> CREATE OR REPLACE PROCEDURE kill_blocking IS 2 l_sid NUMBER (10); 3 l_serial NUMBER (10); 4 l_wait NUMBER (10); 5 l_username VARCHAR2 (20); 6 sqlstmt VARCHAR2 (1000); 7 BEGIN 8 SELECT s1.SID, s1.serial#, s2.seconds_in_wait, s2.username 9 INTO l_sid, l_serial, l_wait, l_username 10 FROM v$lock l1, 11 v$session s1, 12 v$lock l2, 13 v$session s2, 14 v$sql sqlt1, 15 v$sql sqlt2 16 WHERE s1.SID = l1.SID 17 AND s2.SID = l2.SID 18 AND sqlt1.sql_id = s2.sql_id 19 AND sqlt2.sql_id = s1.prev_sql_id 20 AND l1.BLOCK = 1 21 AND l2.request > 0 22 AND l1.id1 = l2.id1 23 AND l2.id2 = l2.id2; 24 25 IF l_username = 'APP' AND l_wait > 100 26 THEN 27 sqlstmt := 28 'ALTER SYSTEM KILL SESSION ''' 29 || TO_CHAR (l_sid) 30 || ',' 31 || TO_CHAR (l_serial) 32 || ''''; 33 DBMS_OUTPUT.put_line (sqlstmt); 34 35 EXECUTE IMMEDIATE sqlstmt; 36 END IF; 37 EXCEPTION 38 WHEN NO_DATA_FOUND 39 THEN 40 41 DBMS_OUTPUT.put_line ('No Data Found'); 42 END; 43 / No Data Found PL/SQL procedure successfully completed.
-
Function body PLSQL returning a sql report returns ORA-01403 no data found
I'm on APEX 3.1.2.00.02 and Oracle 10 g.
I develop a relationship with the type of SQL query (body of function from PL/SQL returning SQL query). But the performance of the report, I get
error report:
ORA-01403: no data found
Source of the region
Proceduredeclare qry varchar2(32767); begin --Procedure call my_pkg.get_query(qry); htp.p(qry); return /*select 1 from dual */ qry; end;
The query will be improved later to add more month and year according to the user settings that I am running on this report.PROCEDURE get_query (V_QRY OUT VARCHAR2) IS qry varchar2(32767); begin qry := ' select name , max(decode(to_char(service_date,''Mon-YY''), ''Jan-09'', value, null)) as "Jan-09" , max(decode(to_char(service_date,''Mon-YY''), ''Jan-09'', value, null)) as "Feb-09" from MY_TABLE group by name '; V_QRY := qry; end;
I want to use specific query column names. I saw this suggestion from Scott in a number of threads to use / * select 1 double * / with the query, but does not not in my case.
Please can anyone suggest what I can do to make it work?
Kind regards
AmirFirst of all, unit you have tested the procedure (namely, in the workshop of SQL, SQL * Plus, SQL Developer, etc, etc) to see if it produces the output in the first place right?
If you have, and the generated query string is valid, try to assign the output to a page element (allowing you to visualize in the session browser), or even through the procedure output window for debugging (using the wwv_flow.debug function). This might indicate a change of State or session that is causing it not to return. You might find this easier to achieve if you switch from one "procedure and output parameter ' combination 'function returning string' approach."
If not, try to re-create the report in a new region - sometimes I came across strange bugs with parts of the report which were solved in this way.
-
Currently I have this statement as follows in my pl/sql.
I want to insert in my variables I_seq_no, I_transid when the columns: MAX (seq_no) and trans_id are nowhere to be found. Now, I've used this query, I didn't hit no data found error in this statement. How am I supposed to do what I want by modifying the query?FOR i IN C1 LOOP SELECT NVL(MAX(seq_no),i.seq_no), NVL(trans_id,i.trans_id) INTO I_seq_no,I_transid FROM customer WHERE customer_id = C_customer_id group by trans_id ; END LOOP;
Hello
This might give you an idea
SQL> declare 2 i varchar2(50); 3 begin 4 select last_name into i from ( 5 select nvl(( 6 select last_name from employees where employee_id=999 7 ),'NOT FOUND') last_name from dual 8 ); 9 dbms_output.put_line(i); 10 end; 11 / NOT FOUND PL/SQL procedure successfully completed SQL> SQL> declare 2 i varchar2(50); 3 begin 4 select last_name into i from ( 5 select nvl(( 6 select last_name from employees where employee_id=100 7 ),'NOT FOUND') last_name from dual 8 ); 9 dbms_output.put_line(i); 10 end; 11 / King PL/SQL procedure successfully completed
-
OBIEE 11.1.1.7 have reported "no data found" on data table columns
Creates a data source jdbc using the 'Manage the Sources of private data' button, then a model of data using this data source and some sql codes. Sample recorded data. Trying to create reports OBIEE, but when I drag the columns on the data model, they appear in the table of data as any data found: / COLUMN_PATH
When I try to run reports, they end up error, does not display any data.
If I use BI Publisher reports on this data model, those that work very well.
Any ideas on what's going on?
Hello
'Manage private Data Sources' = BI Publisher
"data model" = BI Publisher
OBIEE reports on BI Publisher data model? Impossible!
I can't imagine even where you have found a way to create an analysis using a BI Publisher data model as a source.
BI Publisher reports against BI Publisher data model works very well = this is the expected behavior.
What/where/how do you do your analysis OBIEE?
-
The execution of the trigger, 01403 error. 00000 - "no data found".
Hi guys, Pl/Sql
When we try to run after initiation, as 01403 error. 00000 - "no data found".
Trigger is
CREATE OR REPLACE TRIGGER SYNC_OUGR_USER_ADDRESS
AFTER INSERT ON OUGR_USER_ADDRESS FOR EACH LINE
DECLARE
P_CD_ADDR_TYPE OUGR_USER_ADDRESS. TYPE % CD_ADDR_TYPE;
P_AD_CITY OUGR_USER_ADDRESS. TYPE % AD_CITY;
CITY OF P_NM_NAME. TYPE % NM_NAME;
P_FL_OVERSEAS OUGR_USER_ADDRESS. TYPE % FL_OVERSEAS;
P_AD_COUNTRY OUGR_USER_ADDRESS. TYPE % AD_COUNTRY;
P_TEMP_CITY VARCHAR2 (10);
P_CD_CODE REF_COUNTRY_CODE. TYPE % CD_CODE;
BEGIN
P_CD_ADDR_TYPE: =: NEW. CD_ADDR_TYPE;
P_FL_OVERSEAS: =: NEW. FL_OVERSEAS;
P_AD_CITY: =: NEW. AD_CITY;
P_AD_COUNTRY: =: NEW. AD_COUNTRY;
SELECT LENGTH (TRIM (TRANSLATE (P_AD_CITY, ' + -. 0123456789', ' '))) IN THE DOUBLE P_TEMP_CITY; -to check if the value is numeric
SELECT NM_NAME IN THE P_NM_NAME OF THE CITY WHERE ID_TOWN = P_AD_CITY;
SELECT CD_CODE INTO P_CD_CODE FROM REF_COUNTRY_CODE WHERE CD_CODE = P_AD_COUNTRY;
IF P_CD_ADDR_TYPE ('ma', 'PA') THEN
IF P_TEMP_CITY IS NULL THEN
P_AD_CITY: = P_NM_NAME;
ON THE OTHER
P_AD_CITY: = P_AD_CITY;
END IF;
ON THE OTHER
P_AD_CITY: = P_NM_NAME;
END IF;
IF P_FL_OVERSEAS = "Y" THEN
P_AD_COUNTRY: = P_CD_CODE;
ON THE OTHER
P_AD_COUNTRY: = P_AD_COUNTRY;
END IF;
INSERT INTO OUGR_USER_ADDRESS@TO_GVRS
(ID_ADDRESS,
CD_ADDR_TYPE,
AD_UNIT,
AD_NUM,
AD_STR1,
AD_STR2,
AD_CITY,
AD_COUNTY,
AD_ST,
AD_COUNTRY,
AD_ZIP5,
AD_ZIP4,
FL_AD_RURAL,
FL_OVERSEAS,
TM_STAMP
)
VALUES (: NEW.ID_ADDRESS,)
: NEW. CD_ADDR_TYPE,
: NEW. AD_UNIT,
: NEW. AD_NUM,
: NEW. AD_STR1,
: NEW. AD_STR2,
P_AD_CITY,
: NEW. AD_COUNTY,
: NEW. AD_ST,
P_AD_COUNTRY,
: NEW. AD_ZIP5,
: NEW. AD_ZIP4,
: NEW. FL_AD_RURAL,
: NEW. FL_OVERSEAS,
: NEW. TM_STAMP
);
END SYNC_OUGR_USER_ADDRESS;
/
Greatly appreciate your help in this regard.
Thanks in advance.
Kind regards
REDA
Hi, Raj,
Instead of
SELECT LENGTH (TRIM (TRANSLATE (P_AD_CITY, ' + -. 0123456789', ' '))) IN THE DOUBLE P_TEMP_CITY; -to check if the value is numeric
SELECT NM_NAME IN THE P_NM_NAME OF THE CITY WHERE ID_TOWN = P_AD_CITY;
SELECT CD_CODE INTO P_CD_CODE FROM REF_COUNTRY_CODE WHERE CD_CODE = P_AD_COUNTRY;
You can say:
P_TEMP_CITY: = LENGTH (TRIM (TRANSLATE (P_AD_CITY, ' + -. 0123456789', ' ')));
SELECT MIN (NM_NAME)
IN P_NM_NAME
OF THE CITY
WHERE ID_TOWN = P_AD_CITY;
SELECT MIN (CD_CODE)
IN P_CD_CODE
OF REF_COUNTRY_CODE
WHERE CD_CODE = P_AD_COUNTRY;
You don't need the double table much in PL/SQL.
When you use an aggregate function (MIN, as above) without a clause GROUP BY, the result set is guaranteed to have exactly 1 row. This also avoids the error (ORA-01422) TOO_MANY_ROWS, which is probably impossible in this example.
-
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;
-
report "no data found".
Hello together,
I use Apex 4.2.4 with a DB XE on Windows.
I'm creating a mobile application.
I created a report showing specific information from the user.
Sometimes, it is possible that there is no information available. In this case the report displays the message/exception "no data found".
Is there a solution to hide this message?
My plan is to show only the data if they are available and show nothing when no data found.
For the user, it should look like this, there is not a report if no data is available.
I don't want to see the message "no data found".
Thanks for your help
Joe
Joe_990933 wrote:
I use Apex 4.2.4 with a DB XE on Windows.
My plan is to show only the data if they are available and show nothing when no data found.
For the user, it should look like this, there is not a report if no data is available.
Control if the area of report is displayed using a Exists (SQL query returns at least one row) condition with a query that returns at least one row if the report contains data.
-
No data found in report csv or pdf on first loading of the page
No data found in report csv output on the first load of the page. Report appears on the page, but no data is available in csv or pdf output. I still need to send the page and then it shows the data in the downloads. The page contains a form (read-only) with a report that refers to 4 page elements by using something like the following:
and b.employee_no = v ('P5_EMPLOYEE_NO')
and c.fisc_year_pk = v ('P5_FISC_YEAR_PK')
and b.job_class = v ('P5_JOB_CLASS')
and b.organization = v ('P5_ORGANIZATION')
Yet once again, report to page appears except there is no data in the downloads. Can someone help me solve this problem? I'm under Oracle APEX 4.2.1 in Oracle database 11 g 2.
Thank you.Sounds like a question of classic session state.
You must eat the page elements using calculations of page rendering to ensure they are set to session state.
Or if the download is triggered by a button, you should check that the elements of the page are subject to session state, perhaps via an action of PL/SQL.
Scott
-
Using Apex 4.1.1
I need my application to redirect to another page when the user performs a search and there is no data found. The query in the report is too complicated and is a "Body of function from PL/SQL returning SQL query" and must be like that. It just does not work on its own.
Initially, I tried to Javascript to run onLoad & run loading Page like:
But javascript as it's too unreliable in IE 7, which is what users use and does not work in some cases while in others works.function redirect_on_no_data_found2() { // if user came from non-catalogue page if($(".nodatafound").html() == "no data found") { redirect('f?p=129:8:'+$v('P1_SESSION_ID_VALUE')+':NO_DATA_FOUND:NO::'); } }
Is there another way I could do a redirect without javascript or using the APEX_APPLICATION.redirect procedure. Little short of ideas.
Thank you very much.Hello
I wrote this blog post where is also link to example
http://dbswh.webhop.NET/HTMLDB/f?p=blog:read:0:article:6611800346018314I have test, you must use a fixed value as function APEX_UTIL. SAVEKEY_VC2 call parameter and select the double wrap.
In this way, the function is called only once in the report query.Kind regards
Jari
-----
My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
Twitter: http://www.twitter.com/jariolai -
Help simple loop for no data found
I am new to PL/SQL and will have problems trying to manage people entering in a good REC BANNER_ID. In the beginning of the game
I get no data found when an identification number is entered that does not exist in the spriden table. I want to be able to have the people who did not go in a good REC BANNER_ID in skipped records County which is towards the end. I tried a lot of things, but I do not seem to get anywhere. I'm sure it's pretty simple. I think I need to add some kind of "* IF."for rec in c1 loop select SPRIDEN_pidm into pidm from SPRIDEN where SPRIDEN_ID = rec.BANNER_ID and SPRIDEN_CHANGE_IND is null;
statement to the article mentioned above. Here is the whole part of the code
Here are the results I get with 1 id good and a bad id--set serveroutput on format wraped; set serveroutput on; set verify off; spool /u03/banjobs/LOCAL/student/scholar_insert.txt Declare term_code varchar2(6) := '&&TERM'; cursor c1 is select * from ttubantemp.SXTSCHOLAR; Pidm Number; so varchar2(2); icnt number := 0; cnt number := 0; insert_cnt number := 0; update_cnt number := 0; exist_cnt number := 0; skip_cnt number := 0; BEGIN dbms_output.enable (buffer_size => null); for rec in c1 loop select SPRIDEN_pidm into pidm from SPRIDEN where SPRIDEN_ID = rec.BANNER_ID and SPRIDEN_CHANGE_IND is null; Select Count(*) Into Cnt From SPRCMNT Where Sprcmnt_Pidm = Pidm And Sprcmnt_Cmtt_Code = 'SO'; -- and SPRCMNT_TEXT not like term_code; If Cnt > 0 Then Select Sprcmnt_Cmtt_Code Into So From Sprcmnt Where Sprcmnt_Pidm = Pidm and SPRCMNT_CMTT_CODE = 'SO'; Else so := null; end if; -- dbms_output.put_line('BANNER_ID = '||rec.BANNER_ID|| ' - PIDM = '||Pidm|| ' - Term = '||Term_Code|| ' - cnt = '||Cnt); If Pidm Is Not Null then Select Count(*) Into Cnt From Spriden Where Spriden_Pidm = Pidm And So Is Null; if cnt > 0 then dbms_output.put_line(' INSERTING'); INSERT INTO sprcmnt( SPRCMNT_PIDM, SPRCMNT_CMTT_CODE, SPRCMNT_TEXT, SPRCMNT_TEXT_NAR, SPRCMNT_CONFIDENTIAL_IND, SPRCMNT_DATE, SPRCMNT_ORIG_CODE, SPRCMNT_ACTIVITY_DATE, SPRCMNT_CTYP_CODE, SPRCMNT_CONTACT_DATE, SPRCMNT_USER_ID, SPRCMNT_CONTACT_FROM_TIME, SPRCMNT_CONTACT_TO_TIME) VALUES (pidm, 'SO', term_code, NULL, 'N', Sysdate, 'SCHL', SYSDATE, NULL, Null, 'NEXTGEN', NULL, NULL); insert_cnt := insert_cnt + 1; else select count(*) into cnt from sprcmnt Where Sprcmnt_Pidm = Pidm And So Is Not Null And Sprcmnt_Text Like '&&%TERM%'; if cnt > 0 then dbms_output.put_line(' UPDATING'); update sprcmnt set SPRCMNT_TEXT = SPRCMNT_TEXT||' '||term_code where SPRCMNT_PIDM = pidm and SPRCMNT_CMTT_CODE = 'SO'; update sprcmnt set SPRCMNT_ACTIVITY_DATE = sysdate where SPRCMNT_PIDM = pidm and SPRCMNT_CMTT_CODE = 'SO'; Update Sprcmnt set SPRCMNT_USER_ID = 'NEXTGEN' where SPRCMNT_PIDM = pidm and SPRCMNT_CMTT_CODE = 'SO'; update_cnt := update_cnt + 1; else dbms_output.put_line(' RECORD EXISTS'); exist_cnt := exist_cnt + 1; end if; end if; icnt := icnt + 1; else dbms_output.put_line('SKIPPED BANNER_ID = '||rec.BANNER_ID); skip_cnt := skip_cnt + 1; end if; end loop; commit; dbms_output.put_line('Total Records = '||icnt); dbms_output.put_line('Records Inserted = '||insert_cnt); dbms_output.put_line('Records Updated = '||update_cnt); dbms_output.put_line('Records Existed = '||exist_cnt); dbms_output.put_line('Records Skipped = '||skip_cnt); END; / spool off; / EXIT
Error report:
ORA-01403: no data found
ORA-06512: at line 15 level
01403 00000 - "no data found".
* Cause:
* Action:
BANNER_ID = T00001227 - PIDM = 1450 - term = 201280 - cnt = 0
INSERTION OF
Engage
Here are the results with only a good idea
anonymous block filled
BANNER_ID = T00001227 - PIDM = 1450 - term = 201280 - cnt = 0
INSERTION OF
Total records = 1
Inserted records = 1
Put records = 0
Folders existed = 0
Ignored records = 0
Engage
Edited by: Withnoe 6 July 2012 14:27Put another block of start-end inside the loop (around your select statement) and includes an exception handler.
Pseudocode here:for rec in c1 loop BEGIN select SPRIDEN_pidm into pidm from SPRIDEN where SPRIDEN_ID = rec.BANNER_ID and SPRIDEN_CHANGE_IND is null; EXCEPTION WHEN NO_DATA_FOUND THEN dbms_output.put_line('SKIPPED BANNER_ID = '||rec.BANNER_ID); skip_cnt := skip_cnt + 1; END; . . . end loop;
In addition, if you count the records to see if he has at least 1 card that meets the condition, why count ALL records? You can count and put "rownum = 1" or "" rownum < 2"="" so="" it="" stops="" when="" it="" gets="" to="" one="" row.="" another="" way="" i="" like="" to="" do="" it="" is="" "select="" count(*)="" from="" dual="" where="">
". But often there is no need to count at all. People will sometimes do a count to see if there is to be done and if so, then run. In many cases, it is best to try just to get the job done without counting any first.
-
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
-
why its shows no data found?
why its shows no data found?
I have SEQ column in my table.
DECLARE
V_ENAME varchar2 (20);
V_SEQ varchar2 (20);
L_E_SEQ varchar2 (20);
L_ENAME varchar2 (20);
Start
SELECT ENAME, SEQ IN V_ENAME, V_SEQ FROM VEN_EMP WHERE EMPNO = 7369;
IF V_SEQ = 1 THEN
L_ENAME: = V_ENAME;
ON THE OTHER
L_E_SEQ: = V_SEQ-1;
SELECT ENAME IN V_ENAME FROM EMP WHERE SEQ = L_E_SEQ;
dbms_output_line (v_ename);
END IF;
END;
Published by: ayman on March 19, 2012 23:341 DECLARE 2 v_ename varchar2(20); 3 v_sql varchar2(20); 4 L_E_SEQ varchar2(20); 5 V_SEQ NUMBER(20); 6 L_ENAME VARCHAR2(20); 7 begin 8 SELECT ENAME,SEQ INTO V_ENAME,V_SEQ 9 FROM 10 (select 'FOR' ENAME,1 SEQ,100 EMPNO from dual union all 11 select 'FOR' ENAME,2,7369 from dual 12 ) WHERE EMPNO=7369; 13 IF V_SEQ=1 THEN 14 L_ENAME:=V_ENAME; 15 ELSE 16 L_E_SEQ:=V_SEQ-1; 17 SELECT ENAME INTO V_ENAME 18 FROM 19 (select 'FOR' ENAME,1 SEQ,100 EMPNO from dual union all 20 select 'FOR' ENAME,2,7369 from dual 21 ) WHERE SEQ=L_E_SEQ; 22 dbms_output.put_line(v_ename); 23 END IF; 24 END; 25 / FOR PL/SQL procedure successfully completed.
What is the problem?
-
No data found in the select statement error
Hi all
Find my sample table and data structure:
Now, I create a block like:SQL> desc states; Name Null? Type ----------------------------------------------------- -------- ------------------------------------ SNO NUMBER SNAME VARCHAR2(10) SQL> select*from states; SNO SNAME ---------- ---------- 1 kerala 2 Tamil nadu 3 AP 4 MP 5 jammu
After excecuting this block no data found error takes place.declare v_state varchar2(20):=' AP'; v_no number; begin select sno into v_no from states where sname=v_state; dbms_output.put_line(v_no); end; /
Coz in where defective condition. "AP"="AP."
What oracle function I should use to eliminate this error.
I tried something like
But it defective. Please help mewhere trunc(sname)=trunc(v_state);
/ * Don't know what is your exact question, but: * /.
use the TOPPING instead of TRUNC
Published by: hoek on November 26, 2011 10:00
-
apex_application.g_f0X - no data found?
All,
We are running in a sporadic error (don't you hate those?) save a form in a table where up an error "no data found". We use a custom PL/SQL record the process which makes a loop through all the fields in g_f0X to save the data of the user. Through the liberal use of the debug messages, I found that the error occurs in these two lines:
Here is the HTML code for the appropriate line (in this case, I have is 22), just before hitting the Save button and get the error:nmin := apex_application.g_f04(i); nmax := apex_application.g_f05(i);
No idea what's happening, and how can I solve this problem?<td headers="NEW_MIN" class="data"> <label for="f04_0022" class="hideMe508">NEW_MIN</label> <input type="text" name="f04" size="6" maxlength="2000" value="11" data_field="new_min" id="f04_0022"/> </td> <td headers="NEW_MAX" class="data"> <label for="f05_0022" class="hideMe508">NEW_MAX</label> <input type="text" name="f05" size="6" maxlength="2000" value="17" data_field="new_max" id="f05_0022"/> </td>
Thank you
-David - Is there some JS code disabled a few lines before the submit?
- Is it possible that you use one of these paintings 04 or 05 in other places on the page, except the measurement report?
- If you use a wwv_flow.debug (apex_application.g_f04. COUNTY) and wwv_flow.debug (apex_application.g_f05. COUNTY)
Match these values, which is also the same as the number of lines that you see in the report?
Maybe you are looking for
-
Can't stop Mac like Finder does not close
I tried to cancel a copy of file on an external hard drive by clicking on the 'x '. I get the message 'stop' to cancel it, but it happened for 24 hours now. Finder does not close because there is always this cancellation in operation. How can we get
-
Cannot use Apple pencil while loading
Is it just me or can you not use the pencil to Apple on iPad Pro while his charge? I use a regular official iPhone charger to charge it.
-
Why my computer can not uninstall all programs?
I went to uninstall WinZip, and it came with an error indicating that the Windows Installer Service could not be accessed. I thought it was my computer is trying to be a comedian once again, so I went to reboot. I went to uninstall it again, and it c
-
How get index of the Terminal to reduce
You need to get the index of the minimize point, marked as cycle of red in the attached word file. It's a data from different sample devices, so the curve may change a little each time. But the general pattern is the same, just 2 main peaks. I tried
-
PowerEdge R515 (S/T: CCDK65J) - Batteria controller brain [CF]
Buongiorno, Ho di acquistare batteria tampone di ricambio per controller need it (integrated PERC H700). VI chiedo Dove e como posso procedere. Grazie