Dum using select statement on STXL :SV_TNEW_PAGE_ALLOC_FAILED
Hi all,
Below select query is throwing a dump SV_TNEW_PAGE_ALLOC_FAILED . The total records which are there in database for the below selection is around 5 Lac record.The dump occured because at the point
The internal table "IT_33" could not be enlarged further.
To extend the internal table, 15978 bytes of storage space was
needed, but none was available. At this point, the table "IT_33" has
327606 entries.
SELECT relid
tdobject
tdname
tdid
tdspras
clustd
FROM stxl
INTO TABLE t_stxl
WHERE relid EQ c_tx
AND tdobject IN param_5
AND tdid IN (c_id,c_zb01,c_zb02,c_zb03)
AND tdspras EQ c_e.
I am thinking to use PACKET SIZE to process chunk by cunk data, please advice if experts here have some valuable suggestion for the same.
Or have a different idea.
After the selection i loop the internal tbale to read data via read_text f.m and tranfer data to application server
Regards
Bhanu
>After the selection i loop the internal tbale to read data via read_text f.m and tranfer data to application server
no, the data are already transferred to the application serer. Why another LOOP and read.
The main question is what will be done with the huge amount of data at the end, displayed (who wants to see them?), aggregated (try to do it in the DB) or inserted processed data into other DB tables (there you will need much small sizes, otherwise it will dump again!)
Similar Messages
-
Using Select statement in IF condition?
hi all,
Can i use select statement in IF COndition in pl sql ?
eg like- if( select 1 from ASD) then
end if;There is no way to do any kind of select statement inside if conditions.
Why don't test simple cases like this first?
An example to show it.
SQL> begin
2 if exists (select 1 from dual) then
3 dbms_output.put_line('ok');
4 end if;
5 end;
6 /
if exists (select 1 from dual) then
ERRORE alla riga 2:
ORA-06550: line 2, column 5:
PLS-00204: function or pseudo-column 'EXISTS' may be used inside a SQL
statement only
ORA-06550: line 2, column 2:
PL/SQL: Statement ignored
SQL> begin
2 if ( (select count(*) from dual) > 0 ) then
3 dbms_output.put_line('ok');
4 end if;
5 end;
6 /
if ( (select count(*) from dual) > 0 ) then
ERRORE alla riga 2:
ORA-06550: line 2, column 8:
PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
( - + case mod new not null others <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute forall merge time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<an alternatively-quoted string literal with character set specification>
<an alternativ
ORA-06550: line 2, column 33:
PLS-00103: Encountered the symbol ")" when expecting one of the following:
. , @ ; for <an identifier>
<a double-quoted delimited-identifier> group having intersect
minus order partition start subpartition union where connect
SQL> begin
2 if ( 0 in (select count(*) from dual) ) then
3 dbms_output.put_line('ok');
4 end if;
5 end;
6 /
if ( 0 in (select count(*) from dual) ) then
ERRORE alla riga 2:
ORA-06550: line 2, column 12:
PLS-00405: subquery not allowed in this context
ORA-06550: line 2, column 2:
PL/SQL: Statement ignoredBye Alessandro -
Number of rows inserted is different in bulk insert using select statement
I am facing a problem in bulk insert using SELECT statement.
My sql statement is like below.
strQuery :='INSERT INTO TAB3
(SELECT t1.c1,t2.c2
FROM TAB1 t1, TAB2 t2
WHERE t1.c1 = t2.c1
AND t1.c3 between 10 and 15 AND)' ....... some other conditions.
EXECUTE IMMEDIATE strQuery ;
These SQL statements are inside a procedure. And this procedure is called from C#.
The number of rows returned by the "SELECT" query is 70.
On the very first time call of this procedure, the number rows inserted using strQuery is *70*.
But in the next time call (in the same transaction) of the procedure, the number rows inserted is only *50*.
And further if we are repeating calling this procedure, it will insert sometimes 70 or 50 etc. It is showing some inconsistency.
On my initial analysis it is found that, the default optimizer is "ALL_ROWS". When i changed the optimizer mode to "rule", this issue is not coming.
Anybody faced these kind of issues?
Can anyone tell what would be the reason of this issue..? any other work around for this...?
I am using Oracle 10g R2 version.
Edited by: user13339527 on Jun 29, 2010 3:55 AM
Edited by: user13339527 on Jun 29, 2010 3:56 AMYou have very likely concurrent transactions on the database:
>
By default, Oracle Database permits concurrently running transactions to modify, add, or delete rows in the same table, and in the same data block. Changes made by one transaction are not seen by another concurrent transaction until the transaction that made the changes commits.
>
If you want to make sure that the same query always retrieves the same rows in a given transaction you need to use transaction isolation level serializable instead of read committed which is the default in Oracle.
Please read http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10471/adfns_sqlproc.htm#ADFNS00204.
You can try to run your test with:
set transaction isolation level serializable;If the problem is not solved, you need to search possible Oracle bugs on My Oracle Support with keywords
like:
wrong results 10.2Edited by: P. Forstmann on 29 juin 2010 13:46 -
How to pass parameter in Function by using select statement?
Hi,
I got a problem. I cant pass in parameter to function by using select statement. But it can pass in parameter by using 'hardcode' method. How can I solve this problem?
Eg,
select * from table (SplitFunction('HS750020,HS750021')) <<< this work.
but
select * from table (SplitFunction(select LOT_NO from TRACER_SEARCH_SCHEDULE where JOB_ID = '36')) <<< do not work.
Thanks for who try to help. Thanks.skymonster84 wrote:
I have try this before. But it not work.here is an example
create or replace type stringlist as table of varchar2(100)
create or replace function splitstring(pstring in varchar2) return stringlist
as
lstringlist stringlist;
begin
select regexp_substr(pstring,'[^,]+',1, level) bulk collect into lstringlist
from dual
connect by level <= length(pstring)-length(replace(pstring,','))+1;
return lstringlist;
end;
select * from table(select splitstring('xx,yy,zz') from dual)
create table t(str varchar2(100))
insert into t values('x,y,z')
insert into t values('a,b,c')
select * from table(select splitstring(str) from t where rownum<2)
/If you supply multiple values then it will fail.
select * from table(select splitstring(str) from t)
/ -
Hi,
I am trying to insert values using select statement. But this is not working
INSERT INTO contribution_temp_upgrade
(PRO_ID,
OBJECT_NAME,
DELIVERY_DATE,
MODULE_NAME,
INDUSTRY_CATERGORIZATION,
ADVANTAGES,
REUSE_DETAILS)
VALUES
SELECT
:P1_PROJECTS,
wwv_flow.g_f08(vRow),
wwv_flow.g_f09(vRow),
wwv_flow.g_f10(vRow),
wwv_flow.g_f11(vRow),
wwv_flow.g_f12(vRow),
wwv_flow.g_f13(vRow)
FROM DUAL;
Please let me know what i am missing..
Thanks
SudhirTry this
INSERT INTO contribution_temp_upgrade
(PRO_ID,
OBJECT_NAME,
DELIVERY_DATE,
MODULE_NAME,
INDUSTRY_CATERGORIZATION,
ADVANTAGES,
REUSE_DETAILS)
SELECT
:P1_PROJECTS,
wwv_flow.g_f08(vRow),
wwv_flow.g_f09(vRow),
wwv_flow.g_f10(vRow),
wwv_flow.g_f11(vRow),
wwv_flow.g_f12(vRow),
wwv_flow.g_f13(vRow)
FROM DUAL;Note: when you are selecting a value using select statement, you should not specify the keyword "values".
i assume you have already assigned value for your bind variable :P1_PROJECTS and rest of the functions will return some value.
Regards,
Prazy -
How can I select columns from a table EMP, using Select statement?.
Hi Friends,
How can I select columns from a table EMP?.
I want to select columns of EMP table, using select statement.
Please reply me urgently.
ShahzadSomething like this:
scott@DBA> select empno,ename,job from emp;
EMPNO ENAME JOB
7369 SMITH CLERK
7499 ALLEN SALESMAN
7521 WARD SALESMAN
7566 JONES MANAGER
7654 MARTIN SALESMAN
7698 BLAKE MANAGER
7782 CLARK MANAGER
7788 SCOTT ANALYST
7839 KING PRESIDENT
7844 TURNER SALESMAN
7876 ADAMS CLERK
7900 JAMES CLERK
7902 FORD ANALYST
7934 MILLER CLERK
14 rows selected.Check the documentation:
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#sthref9697
Message was edited by:
Delfino Nunez -
How to fetch negative sign data using select statement
hi gurus,,
i hv to fetch data which is negative in nature using select statement i m using ppdit table and wrbtr field.(it contains both negative and positive data)....wat sud i add with select statement...plz help me..
thnx in advance
Message was edited by:HI,
I think you can use LT or < 0.0 in the WHERE clause to get all the -ve values. Once you get them treat them as negative.
Regards,
Sesh -
FETCHING VALUES IN MULTI RECORD BLOCK FROM ANOTHER TABLE USING SELECT STATEMENT.
Hi,
I have one multi record block in which i want to fetch values
(more then one record) from another table using select statement
IN KEY NEXT ITEM.I am getting following error.
ORA-01422: exact fetch returns more than requested number of rows
Thanks in advance.In your case I see no reason to use non-database block and to try to populate it from a trigger with a query, instead of using the default forms functionality where you can associate the block and the fields with table, create where clause using bind variables and simply use execute_query() build-in to populate the block. The power of the forms is to use their build-in functionality to interact with the database.
Also, you can base your block on a query, not on a table and you dynamically change this query using set_block_property() build-in. You can use any dynamic queries (based on different data sources) and you simply need to control the column's data type, the number of the columns and their aliases. Something like creating inline views as a block data source.
However, you can replace the explicit cursor with implicit one like
go_block('non_db_block_name');
first_record();
FOR v_tab IN (SELECT *
FROM tab
WHERE col_name = :variable)
LOOP
:non_db_block_name.field1 := v_tab.col1;
:non_db_block_name.field2 := v_tab.col2;
next_record();
END LOOP; -
Can i use select statements in LDB
Hai All,
Can i use select statements and internal table in a LDB program.
my requirement is that if i enter company code , fiscal year and reporting periods.
generally fiscal year will be jan to dec.but in my requirement the fiscal year is apr of previous year to march of currentyear.
so as i require the last years data can iuse select statement in that ldb program or is there any solution for this.
Thanks in Advance
kiranHi Kiran,
To retrive records from ldb you have to use the
GET <node> statement. This will invoke the selection screen of the node. An alternate solution is to use the function module LDB_PROCESS.
Please see the following link for help and example
http://help.sap.com/saphelp_nw04/helpdata/en/64/237f8cd43711d1950b0000e8353423/content.htm
Thanks
Vinod -
How to get the inserted row primary key with out using select statement
how to return the primary key of inserted row ,with out using select statement
Edited by: 849614 on Apr 4, 2011 6:13 AMyes thanks to all ,who helped me .its working fine
getGeneratedKeys
String hh = "INSERT INTO DIPOFFERTE (DIPOFFERTEID,AUDITUSERIDMODIFIED)VALUES(DIPOFFERTE_SEQ.nextval,?)";
String generatedColumns[] = {"DIPOFFERTEID"};
PreparedStatement preparedStatement = null;
try {
//String gen[] = {"DIPOFFERTEID"};
PreparedStatement pstmt = conn.prepareStatement(hh, generatedColumns);
pstmt.setLong(1, 1);
pstmt.executeUpdate();
ResultSet rs = pstmt.getGeneratedKeys();
rs.next();
// The generated order id
long orderId = rs.getLong(1); -
How to avoid data repetation when using select statements with innerjoin
how to avoid data repetation when using select statements with innerjoin.
thanks in advance,
satheeshyou can use a query like this...
SELECT DISTINCT
frg~prc_group1 "Product Group 1
frg~prc_group2 "Product Group 2
frg~prc_group3 "Product Group 3
frg~prc_group4 "Product Group 4
frg~prc_group5 "Product Group 5
prc~product_id "Product ID
txt~short_text "Product Description
UP TO 10 ROWS
INTO TABLE l_i_data
FROM
Joining CRMM_PR_SALESG and
COMM_PR_FRG_ROD
crmm_pr_salesg AS frg
INNER JOIN comm_pr_frg_rod AS prd
ON frgfrg_guid = prdfragment_guid
Joining COMM_PRODUCT and
COMM_PR_FRG_ROD
INNER JOIN comm_product AS prc
ON prdproduct_guid = prcproduct_guid
Joining COMM_PRSHTEXT and
COMM_PR_FRG_ROD
INNER JOIN comm_prshtext AS txt
ON prdproduct_guid = txtproduct_guid
WHERE frg~prc_group1 IN r_zprc_group1
AND frg~prc_group2 IN r_zprc_group2
AND frg~prc_group3 IN r_zprc_group3
AND frg~prc_group4 IN r_zprc_group4
AND frg~prc_group5 IN r_zprc_group5.
reward it it helps
Edited by: Apan Kumar Motilal on Jun 24, 2008 1:57 PM -
Hi,
How can I use select stat. rather than join to join to tables so that I have all the fields from both tables appearing in my output.Hi,
There are two ways to handle the problem.
1. For all entries
Types: begin of str1_tab,
lgnum type lgnum,
ivnum type LVS_IVNUM,
ivpos type LVS_IVPOS,
lgtyp type lgtyp,
lgpla type lgpla,
idatu type LVS_IDATU,
uname type LINK_UNAME,
end of str1_tab.
Data: it_tab1 type table of str1_tab,
wa_tab1 like line of it_tab1.
DATA: it_tab3 TYPE TABLE OF str1_tab,
wa_tab3 LIKE LINE OF it_tab3.
select lgnum ivnum lgtyp uname FROM link INTO CORRESPONDING FIELDS OF
TABLE it_tab1 where lgnum = pa_lgnum AND ivnum IN s_ivnum.
<b>if sy-subrc eq 0.</b>
select lgnum ivnum lgpla idatu from linp into corresponding
fields of table it_tab3 for all entries in it_tab1 <b>where lgnum = itab1-lgnum and ivnum = itab1-ivnum.</b><b>endif.</b>
LOOP AT it_tab3 INTO wa_tab3.
<b>clear wa_tab1.</b>
READ TABLE it_tab1 INTO wa_tab1 WITH
KEY lgnum = wa_tab3-lgnum
ivnum = wa_tab3-ivnum.
IF sy-subrc = 0.
move-corresponding it_tab1 to it_tab3.
<b>modify it_tab3 from wa3 transporting lgtyp uname where lgnum = wa_tab3-lgnum
and ivnum = wa_tab3-ivnum.</b>ENDIF.
clear it_tab3.
endloop.
2. Use inner join
Types: begin of str1_tab,
lgnum type lgnum,
ivnum type LVS_IVNUM,
ivpos type LVS_IVPOS,
lgtyp type lgtyp,
lgpla type lgpla,
idatu type LVS_IDATU,
uname type LINK_UNAME,
end of str1_tab.
Data: it_tab1 type table of str1_tab,
wa_tab1 like line of it_tab1.
select linklgnum linkivnum linklgtyp linkuname linplgpla linpidatu FROM link inner join linp on linklgnum = linplgnum
and linkivnum = linkivnum
into TABLE it_tab1 where lgnum = pa_lgnum AND ivnum IN s_ivnum.
Now itab1 will contain all the values -
How to get all values from an interval using select statement
Hi,
Is it possible to write a select statement that returns all values from an interval? Interval boundaries are variable.
something like this:
select (for x in 1,1024 loop x end loop) from dual
(this, of course, doesn't work)
The result in this example should be 1024 rows of numbers from 1 to 1024. These numbers are parameters, so it is not possible to create a table with predefined values.
Thanks in advance for your help,
Mia.For your simple case, with a lower boundary of 1, you can use:
SELECT rownum
FROM all_objects
WHERE rownum <= 1024For a set of number between say 50 - 100, you can use something like:
SELECT rownum + (50 - 1)
FROM all_objects
WHERE rownum <= (100 - 50 + 1)Note, that all_objects was used only because it generally has a lot of rows. Any table with at least the number of rows in your range will work.
TTFN
John -
How to use SELECT statement to extract KNA1-NAME1 and KNB1-ZSABE
In building table I_KNA1 in form f_extract_data, an additional select statement is needed to select and append datafrom (KNA1 and KNB1) to existing I_KNA1
In form f_extract_data table i_kna1 is populated with data from zd_kna101.(where ZD_KNA101 is a view of KNA1, KNB1 and KNBK. It's a joint of these three tables.) This will take care of all customers with KNBK-BANKL and KNBK-BANLN populated. But this does not include new customers created in SAP CRM (no KNBK records). Therefore a separate SELECT statement is needed to extract KNA1-NAME1 and KNB1-ZSABE for customers created in SAP CRM(the customers who do do not have BANKL and BANKN). These selected records are then need to be appended to I_KNA1. It's possible that new selection statement might extract records that are already in existing I_KNA1 table. IF this is the case, right after the append, sort I_KNA1 and remove duplicate records.
form f_extract_data.
select kunnr " Customer Number
name1 " Name
zsabe " Business Unit
bankl " Legacy Bank Key
bankn " Legacy Bank Account
from zd_kna101 " View of KNA1, KNB1, and KNBK
into table i_kna1
for all entries in i_doc_by_ref
where kunnr = i_doc_by_ref-kunnr
and zsabe in s_zsabe.
if sy-subrc <> 0.
message a116 with 'customer'. " Customer Table is empty. HALT!!!
else.
sort i_kna1 by kunnr.
endif.
will I have to use the join statement(for KNA1-NAME1 and KNB1-ZSABE using the key as KUNNR) here or give two seperate select statements for extracting data from KNA1 and KNB1 using the key as KUNNR.
THANKS FOR THE HELP.I would suggest using the join on KUNNR. Maybe something like this.
data: begin of itab occurs 0,
kunnr type kna1-kunnr,
name1 type kna1-name1,
ZSABE type knb1-ZSABE,
end of itab.
select kna1~kunnr kna1~name1 knb1~zsabe
into table itab
from kna1
inner join knb1
on kna1~kunnr = knb1~kunnr
where ........
Regards,
Rich Heilman -
Using Select Statement in the decoe function in Oralce Form10 g
Hello All:
Is it possible to call another Select Statement inside the Decode Function in Oracle Form? I tested the SQL on PL/SQL Plus, it ran without giving any errors. However, I got the following errors when I tried to compile the procedure in the Oracle Form right after the where condiction at the first select statement....
Error 103 at line number....
Encountered the symbol "," when expecting one of the following
) intersect minus order union .....
Select a.col1
a.col2,
decode((select min(test_date) pa_closr_date from table_name c where a.col1 = c.col1), null, a.col3,(select min(test_date) pa_closr_date from table_name c where a.col1 = c.col1)) test_date,
a.col4,
from table_name a;
thanks ahead for any help.
KMDYou don't need the Select within the decode. In SQL Plus, I tried your SQL using this:
Select
a.col1,
a.col2,
decode( (select min(test_date) pa_closr_date
from table_name c where a.col1 = c.col1), null, a.col3,
(select min(test_date) pa_closr_date
from table_name c where a.col1 = c.col1)
) test_date
from table_name a;And this gives the same result:
Select
a.col1,
a.col2,
decode(c.pa_closr_date, null, a.col3, c.pa_closr_date ) test_date
from table_name a,
( select col1, min(test_date) pa_closr_date
from table_name
group by col1 ) c
where c.col1(+) = a.col1;
Maybe you are looking for
-
ABAP Program to update DSO data
Hi, I want to write a program which will modify existing data in the DSO. But don't know how to approach. I know I can't directly update data table of DSO. Please help.
-
Problem with font changes making video unrenderable
Hi- I hope someone can give me some advice. I have been creating different language versions of a video and until now I merely duplicated the original sequence and then changed the individual titles to create a new language version ( there is no narr
-
Apple TV Screensaver Interrupts Movies
I've had my Apple TV2 for over a year now, and this behavior only just started happening. I'll be watching a movie streaming from Netflix, and suddenly the screen fades to black, making me think the scene has done this intentionally, but if I leave i
-
How to delete an expired security certificate?
Each time I open a fresh Firefox page, I get a message popping up 4 times informing me that a security certificate for a cashback set-up that no longer exists, has expired. How do I get rid of it?
-
Organize Bookmarks In iPad Safari?
Can you organize Bookmarks in Folders?