Facing problem in selecting from table vbrk
Hi,
I have developed a simple report for calculating the total logistic cost.
That program was working fine in the development server.
Now in production, its not working.
While debugging i found that its getting stuck at a select query where its fetching data from VBRK table and is getting timed out.
What should be done for reducing the time?
Please help.
Thanks in advance
Nitin
Hi Naren ,Seshu & Aarun
First of all thanks a lot for replying.
The structure of my select query is
START-OF-SELECTION.
SELECT cityc regiogroup bzirk INTO TABLE it_ztaluka_1
FROM ztaluka_1
WHERE regiogroup IN pregroup.
IF sy-subrc NE 0.
MESSAGE 'No records in ztaluka_1.' TYPE 'E'.
ENDIF.
I N I T I A L I S I N G IT_VBRK F R O M VBRK *******
IF NOT it_ztaluka_1[] IS INITIAL.
SELECT vbeln bzirk regio cityc zzwerks knumv
FROM vbrk
INTO TABLE it_vbrk
FOR ALL ENTRIES IN it_ztaluka_1
WHERE zzwerks IN pzzwerks
AND regio IN pregio
AND cityc = it_ztaluka_1-cityc.
IF sy-subrc NE 0.
MESSAGE 'No records in vbrk.' TYPE 'E'.
ENDIF.
SORT it_vbrk BY vbeln .
The key field is vbeln,but that not included in my where condition as its not in my selection criteria also in the previous tables which r used in the program.
i found the order in the select qusery is not in the order of vbrk table.
That i will change.But since the key field is not included it will again cause problems na??
Similar Messages
-
Problem in displaying data onto Form after selecting from table.
Hi there,
I keep hitting this error when I tried to display the data after the selection from table. Using backing beans w data control to do it
Err: java.lang.ClassCastException: java.util.Collections$SingletonList cannot be cast to java.lang.Integer
Table used ArrayList to retrieve out the wanted data. E.g uses A object
To display: selected data to retrieve the selected row to display as a read-only form layout below the table. E.g. need to get A.getName() to match with B object B.getName() then uses the B object to retrieve out the data.
Anyone know how to do it?Hi
use the follwing code
int rowcount = wdContext.node<Name>().size();
while(rs.next())
IPrivate<ViewName>.I<Name>Element tabnode =wdContext.node<Name>().get<Name>ElementAt(i);
tabnode.nodeAuthoriseNode().invalidate();
tabnode.nodeAuthoriseNode().addElement(0,authele);
tabnode.nodeAuthoriseNode().setLeadSelection(0);
wend
Regards
Dhinakar -
Select * from table not working with Oracle OBDC driver
Hello,
In our web development we have been using the MS ODBC for Oracle
driver to connect to our Oracle db. We decided to try the
Oracle ODBC driver because it supports the commandTimeout
property in ASP which the MS driver does not. The problem I'm
running into now is that all of our select * from table
statements appear not to be working. The Oracle ODBC driver
version we are using is ver 8.00.05.00. Is there something that
I'm not doing properly? If I take the same select * from table
statement and name the columns, I dont get any error. Otherwise
I'm getting a Subscript out of range error. It seems strange to
me that this driver would not support a select * from table
statement (which I''m told is the case by another developer
here).
Is there something I'm missing?
Thanks,
PeteI'm positive I have a connection. Otherwise I wouldn't get a
response when I name the columns instead of using *.
There must be something else that I'm missing or doing wrong.
I've actually been looking into alternative ODBC drivers to see
if I have the same problems but none that I have found support
commandTimeout.
Any other ideas? -
Is select from view faster then select from table..???
Hello Gurus,
I want to query some data from two tables, both of table have many columns (attributes) and many rows...
I use several where clauses to retrieve data from those tables..
witch one is faster, I create a view or I just "select" from those tables???
Regards.
Nia...riedelme wrote:
3360 wrote:
riedelme wrote:
Selecting through a view almost never helps performance and frequently hurts.Views do not affect performance.
Views are simply queries and like queries there are fast and slow ones.I disagree.
First of all, to use a view you are executing a query to get a result set, then accessing the data from that result set - a built-in extra step to perform to get data.First of all that entire explanation of how views work is not correct. The optimizer will rewrite the query to make the view go away if possible.
SQL> create or replace view v as select * from dual;
View created.
SQL> explain plan for select * from dual where dummy = 'X';
Explained.
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 272002086
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 2 | 2 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| DUAL | 1 | 2 | 2 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter("DUMMY"='X')
13 rows selected.
SQL> explain plan for select * from v where dummy = 'X';
Explained.
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 272002086
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 2 | 2 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| DUAL | 1 | 2 | 2 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter("DUMMY"='X')
13 rows selected.Exactly the same.
>
Second, when accessing the data from the view the result sets don't have indexes for fast lookups and efficient joins on later steps.This is also known as just making stuff up and is not how the database works. care to share any references at all for any of this?
>
Third, the systems I've seen that use views extensively - I am looking at one now - tend to perform joins on views using the same tables with the same data over and over. This is a design issue and not specifically a problem with views but they lend themselves to this misuse much too easilyCorrect as I said a view is just a query, and just like queries there are good fast views and bad slow views
>
I'll concede that the problem is not specifically with views themselves but as I just said they lend themselves to misuse. Tuning views of views and views joined to views is difficultYes, queries can be misused as can almost all SQL functions and functionality.
As I said - Views are simply queries and like queries there are fast and slow ones.
Nothing that you have posted that is accurate changes that. -
Select from vbak, vbrk and vbrp
Hi experts,
In one of my programs i hve to select the data from tables <b>VBAK, VBRK</b> and <b>VBRP.</b>
The requirement is:
<b>parameters: p_matnr like vbrp-matnr,
p_charg like vbrp-charg.
select-options: audat for vbak-audat.</b>
upon entering the values on selection-screen,
i need to select <b>FKDAT, FKIMG</b> from tables VBRK and VBRP respectively.
Please help me in writing the selection.
Any help is appreciated.
Thanks a lot.Hi,
Hope this will give u some idea..
select avbeln bfkdat into table itab from vbak as a inner join
vbrk as b on
avbeln = bvbeln where
a~audat in s_audat.
if not itab[] is initial.
select fkimg into corresponding fields of table itab_final
from vbrp for all entries in itab
where vbeln = itab-vbeln and
matnr = p_matnr and
charg = p_charg.
endif.
Cheer,
Vikram
Pls reward fopr helpful replies!! -
Html form for select * from table a
Hi all,
I m looking for report on header/footer part from one apex pages
which will display context from table a, like sql statement
select * from table a, written in html.
Is any examples in java script/html select from tables
(and same insert into table A (...) select * from table b)
thanks,
GordanHello Gordan,
Do you want to show the whole report or just some data of it?
If it's for ex just the name and address you could create two items and have a process or computation to fill it with your select statement.
If it's the whole report, just create the report and put it in for ex. Region 1. In your page template you can specify that Region 1 needs to come into the footer.
Regards,
Dimitri
-- http://dgielis.blogspot.com/
-- http://apex-evangelists.com/
-- http://apexblogs.info/ -
Xmlgen.getxml("select * from table") returns null pointer exception
I am running oracle 8i on solaris server and clinet on windows
NT and i am this select statement
select xmlgen.getxml("select * from table") from dual ,its
returning null pointer exception,i have tried it through
jdbc,even then its returning xml as
<?xml version = '1.0'?>
<ERROR>java.lang.NullPointerException</ERROR>
can any body tell me the error.Help will be really appreciated.I
need an urgent response,if some one can guide me please.
My email is [email protected],if you can give me a quick
response on this email,your effot will be appreciated.
thanks
MasoodWhat is actually throwing the NullPointerException? rs.getMetaData() or table.setModel()?
-
How do I do SELECT * FROM TABLE WHERE KEY IN ({list})?
The title says it all really.
Is there a reasonable performant way to perform the query
SELECT * FROM TABLE WHERE KEY IN ({list})where {list} is String []?
I am currently creating a PreparedStatement with a for loop like this StringBuffer sb = new StringBuffer ("SELECT * FROM TABLE WHERE ID IN (");
for (int ii=0;ii<keys.length;ii++) {
sb.append (keys [ii]);
if (ii != keys.length-1) sb.append (",");
sb.append (")");but this means that the prepared statement is created each time I call my method and so I'm not sure that the optimizer will find it easy to cope with. Is there a construction that I'm missing along the lines of SELECT * FROM TABLE WHERE KEY = ? where I can create the PreparedStatement once and just call setObject or something on it when the values in {list} change?but this means that the prepared statement is created
each time I call my method and so I'm not sure that
the optimizer will find it easy to cope with.You are right, the optimizer won't find that easy to deal with (presuming that is even relevant for your driver/database.) But most optimizers won't do anything with statements that change and that is what you are doing.
You could create several prepared statements which have a common number of bind variables. For example 10 statements with from 1 to 10 bind values. This will work if most of the queries use those. -
Select from table containing clob
If i try to select from table containing clob column in SQL PLus it gives error.
Tab1 contains 3 clob columns and 1 blob column
select * from tab 1;
SP2-0678: Column or attribute type can not be displayed by SQL*Plus
The same statement works in SQL Developer and I am able to see the result.
Actually i am writing the queries and they will be used by Java developers in their JSP page.
So what happens here? Can Java use these select statements or will it throw error like SQL Plus?BLOB column content can't be displayed in SQL*Plus:
SQL> create table t_blob (b blob);
Table created.
SQL> edit
Wrote file afiedt.buf
1* insert into t_blob values('01')
SQL> /
1 row created.
SQL> commit;
Commit complete.
SQL> select * from t_blob;
SP2-0678: Column or attribute type can not be displayed by SQL*PlusBlob and clob columns content can be processed using DBMS_LOB
package procedures and functions or using client's language (like Java)
methods. See JDBC specification.
Rgds. -
Performace Which is better ? : Bapi inside a loop OR Select from Tables
Hi Gurus,
I have a report which displays purchase info records.
If I am selecting from tables i need to use EINA, EINE, EORD and some other tables.
There is a BAPI which gets all purchase info records specific to a vendor , material , purchasing organisation.
QUESTION: Performace wise which is the better Approach, either selecting from tables or BAPI for Purchase info records
Regards
Avi.Whether it using BAPI or select. you need to check the performance. If you have full key for these tables EINA, EINE, EORD then mak a select outside of the loop and within loop use READ TABLE statement with binary search. of if you want multiple records within loop then use loop insdie loop.
Your final objective is to minimise the database hits . If you use bapi inside loop then your database hits will be more
select from EINA
select from EINE
select from EORD
loop at itab,
read table EINA
read table EINE
read table EORD
endloop
a® -
Special Grant to use "Select * from Table(cast..."??
Hi,
I've recently created the types and function to use the Table(Cast(funtion) as type)). It works fine, and gives me the correct result. I've granted execute on the types and on the function to a role that is enabled for a user, but when the user tries to use the "select * from table(cast(function) as type))", he gets a "ORA-01031: Insufficient Privileges" error message. Is there any other grant that must be given to the role, so that the user can execute the select?
Thanks in advance!
DanielHi Kamal,
I'm not sure what anonymous PL/SQL block means. When I (or the user) try to run the select, I enter all the information, i.e., the owners for the type and function: "select * from table(cast(a.my_function(my_argument) as a.my_type))". I'm trying to use SQLPlus at this time, and I have Oracle 8i.
I didn't to explicitly grant execute to the user because that would go against some rules I have to follow... I'll se if I give it a try though!
Thanks! -
Expression Framework / SELECT * FROM TABLE(CAST(...
Hello!
Is it possible to build the following with Toplink Expression Framework?
Example:
CREATE TYPE TY_OB_TEST AS OBJECT
( SYSTOP_NR NUMBER(5,0)
SYS_NR NUMBER(5,0)
IM_SYS_NAME VARCHAR2(80) ) ;
CREATE TYPE TY_TB_TEST AS TABLE OF TY_OB_TEST;
Package1.FUNCTION1 returns Type TY_TB_TEST.
SQL:
select * from TABLE(CAST(PACKAGE1.FUNCTION1(42)) AS TY_TB_TEST ));
thank you!
Harald.Nope, just use SQL.
- Don -
Z report from table VBRK - Release to Accounting indicater
Hello,
Creating a Zreport from table VBRK, and only want to pick billing documnets which are released to Accounting. Is there an indicater in table VBRK, VBRP, or KONV, or somewhere else where i can filter these records.
ThanksHi
You can use the table VBUK field BUCHK, ie, if VBUK-BUCHK = 'A'.
The best manner is the view M_VMCFA. If you see in SE11 you can see as works for the field VBRK-RFBSK.
Regards
Eduardo
Edited by: E_Hinojosa on Sep 7, 2011 4:18 PM -
Insert into table a (select * from table b) - need pk?
Hi there.
I'm going to insert into table FINAL (select * from table STAGING) - same structure but in STAGING the ID column has nulls.
Do I need to provide the ID (primary key) for table FINAL or will it get created based on sequence/trigger?
If I were doing this in a loop I'd get the next val from the sequence but on a simple insert, I'm curious.
thanks!hmm.. what is ?
it didn't like it.
Error(11,4): PLS-00103: Encountered the symbol "[" when expecting one of the following: begin case declare exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge <a single-quoted SQL string> pipe
9i, sqldeveloper -
Select * from table as of Scn fails in powercenter
Hi all, I have written the below query in SQL override of a Powercenter mapping. This fails with 'FROM keyword not found where expected' error. Can you please suggest how else I can fetch last committed data from my source?Select * from table AS OF SCN <Scn no>
Hi All, I have multiple flat files which i need to load in a single table.I did that using indirect option at session level.But need to dig out on how to populate substring of header in name column in target table. i have two columns Id and Name. in all input file I have only one column 'id' with header like H|ABCD|Date. I need to populate target like below example. File 1 File2 H|ABCD|Date. H|EFGH|Date.1 42 5 3 6 Target tale: Id Name1 ABCD2 ABCD3 ABCD4 EFGH5 EFGH6 EFGH can anyone help on what should be the logic to get this data in a table in informatica.
Maybe you are looking for
-
Make purchase order lineu00B4s posting date visible from miro transaction
I have tried to add purchase order line´s posting date from "spro-Materials Management- Logistics Invoice Verification- Incoming Invoice- Maintain Item List Variants" but I can´t. Is it possible? Thanks in advance.
-
ALV Classic - How to extract the selection long text of TYPE LVC_T_FCAT?
DATA: e_dyntab_tb TYPE lvc_t_fcat, e_dyntab_wa TYPE lvc_s_fcat, t_line_reftab TYPE REF TO data. *Populate ALV fiels of TYPE LVC_T_FCAT MOVE: c_matnr TO e_dyntab_wa-fieldname. MOVE: c_material TO e_dyntab_wa-scrtext_l.
-
Table control but without wizard. For instance for the table spfli, I want to design and use a table. The necessary steps for a good display and use are what? Thanks in advance.
-
Hi All I'm trying to found out from where LabVIEW is getting this particular class from, since it isn't showing up when I open the Active X class browser, and yet somehow seems to be magically registered - I have some invoke nodes and it works fine.
-
Advanced Security manager- Error Initializing the Essbase API.
Hi, I have installed OLAPUnderground> Advanced Security manager for exporting all the User security. when i try to click connect it throws a connection error "error Initializing the Essbase API, cannot connect." Has any one seen this error before?