Help me customer name select query
Hello,
I am getting the customer name(NAME1) from KNA1 against a customer number.
DATA: GV_KUNNR TYPOE KUNNR.
GV_KUNNR = FEBEP-PARTN. " Ex: 5000000
SELECT SINGLE * FROM KNA1 WHERE KUNNR EQ GV_KUNNR.
now when i query this customer number in the ABAP dictionary(se16) , i.e KUNNR = '5000000' the abap dictionary see this number as '005000000' and shows me the data, but when i query the table through abap code, it doesnt fetch me any record whereas if i query the customer table against '005000000' it gives me the data.
Will i have to add zeros in before my customer number or how will i proceed ?
Thank,
Shehryar
Hi,
DATA: GV_KUNNR TYPOE KUNNR.
GV_KUNNR = FEBEP-PARTN. " Ex: 5000000
Here, you need to call the Conversion Exit function moduel to conver the KUNNR to internal format, then that will automatically take the leading zero's
CONVERSION_EXIT_ALPHA_INPUT and pass the GV_KUNNR as IMPORT and EXPORT parameters
SELECT SINGLE * FROM KNA1 WHERE KUNNR EQ GV_KUNNR.
Regards
Sudheer
Similar Messages
-
Need help in writing a select query to pull required data from 3 tables.
Hi,
I have three tables EmpIDs,EmpRoles and LatestRoles. I need to write a select Query to get roles of all employees present in EmpIDs table by referring EmpRoles and LatestRoles.
The condition is first look into table EmpRoles and if it has more than one entry for a particular Employee ID than only need to get the Role from LatestRoles other wise consider
the role from EmpRoles .
Sample Script:
Create Table #EmpIDs
(EmplID int )
Create Table #EmpRoles
(EMPID int,Designation varchar(50))
Create Table #LatestRoles
EmpID int,
Designation varchar(50)
Insert into #EmpIDs values (1),(2),(3)
Insert into #EmpRoles values (1,'Role1'),(2,'Role1'),(2,'Role2'),(3,'Role1')
Insert into #LatestRoles values (2,'Role2')
Employee ID 2 is having two roles defined in EmpRoles so for EmpID 2 need to fetch Role from LatestRoles table and for
remaining ID's need to fetch from EmpRoles .
My Final Output of select query should be like below.
EmpID Role
1 Role1
2 Role2
3 Role1
Please help.
MohanMohan,
Can you check if this answers your requirement:
Create Table #EmpIDs
(EmplID int )
Create Table #EmpRoles
(EMPID int,Designation varchar(50))
Create Table #LatestRoles
EmpID int,
Designation varchar(50)
Insert into #EmpIDs values (1)
Insert into #EmpIDs values (2)
Insert into #EmpIDs values (3)
Insert into #EmpRoles values (1,'Role1')
Insert into #EmpRoles values (2,'Role2')
Insert into #EmpRoles values (2,'Role1')
Insert into #EmpRoles values (3,'Role1')
Insert into #LatestRoles values (2,'Role2')
--Method 1
select e.EmplID,MIN(ISNULL(l.Designation,r.Designation)) as Designation
from #empids e
left join #emproles r on e.emplID=r.EmpID
left join #latestRoles l on e.emplID=l.EmpID
group by e.EmplID
--Method 2
;with cte
as
select distinct e.EmplID,r.Designation,count(*) over(partition by e.emplID) cnt
from #empids e
left join #emproles r on e.emplID=r.EmpID
select emplID,Designation
from cte
where cnt=1
UNION ALL
select a.EmplID,l.Designation
from
(select distinct EmplID from cte where cnt>1) a
join #Latestroles l on a.EmplID=l.EmpID
order by emplID
Thanks,
Jay
<If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'> -
Help with finding name for query type
Hi,
A number of years ago I remember at a SQL course coming across a query that had output that looked something like this;
header_1 header_2
value 1 value 2
col_1 col_2 col_3
value_a value b value c
value_b value c value dIm pretty sure its based on a group by query. Would anybody be able to point me in the right direction to find more information for a query that would output in SQL Plus that is a very basic form of a report with header information. Or give me the name of this sort of query so that I can google it?
Benton
Found it Heirarchy Query
Found this as well http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:556385200346423686
Edited by: Benton on Aug 12, 2011 1:21 PM
Edited by: Benton on Aug 12, 2011 1:36 PMTrooper wrote:
is there any fuction like nearby, cant use betweenThe MIN aggregate function perhaps?
select min(g.grade) from comqdhb.gradevalues@glink g ...Regards,
Rob. -
Need help for the following select query-- illegal character
select product_group_id from product_group where description like '%%'
I am not able to identify this character.
When I try to type this character at
SQL prompt, it does not accepts it.
This character is in the description field and I have to replace it with NULL..
Any suggestions..
Thanks in advance
nullI'm not sure about the character you are talking about. But if you find this character in the ASCII character set, you can do all the operation against it with the help of CHR() function.
-
Need help tuning on this select query
select a.exceptionid, c.sequencenumber, c.messagedelay,a.exceptioncode
from exceptiondetailview a, exceptionrecaltkey b, sequencerconfig c
where a.exceptionid = b.exceptionid
and a.transactiontype = c.transactiontype
and a.exceptionid in (
select exceptionid
from exceptionrecaltkey
where altkeyname = 'SequenceKey' and altkeyvalue like ('%[11968176]%'))
minus
select exceptionid
from exceptionrecaltkey
where altkeyname = 'SequenceFlowName'
and altkeyvalue <> 'APV_OUTBOUND')
and b.altkeyname = 'SequenceKey'
and c.sequenceflowname = 'APV_OUTBOUND'
and c.sequencenumber > ( decode(ASN, null, (select min(sequencenumber) from sequencerconfig where sequenceflowname = 'APV_OUTBOUND' and exceptioncode = a.exceptioncode),
(select sequencenumber from sequencerconfig where sequenceflowname = 'APV_OUTBOUND' and transactiontype = ASN and exceptioncode = a.exceptioncode) ) )
and a.status = 'New'Hi,
Please try this ,
select a.exceptionid, c.sequencenumber, c.messagedelay,a.exceptioncode
from exceptiondetailview a, exceptionrecaltkey b, sequencerconfig c
where
exists a.exceptionid in (
select exceptionid
from exceptionrecaltkey
where altkeyname = 'SequenceKey' and altkeyvalue like ('%[11968176]%'))
and a.exceptionid = b.exceptionid
and a.transactiontype = c.transactiontype
minus
select exceptionid
from exceptionrecaltkey
where altkeyname = 'SequenceFlowName'
and altkeyvalue 'APV_OUTBOUND')
and b.altkeyname = 'SequenceKey'
and c.sequenceflowname = 'APV_OUTBOUND'
and c.sequencenumber > ( decode(ASN, null, (select min(sequencenumber) from sequencerconfig where sequenceflowname = 'APV_OUTBOUND' and exceptioncode = a.exceptioncode),
(select sequencenumber from sequencerconfig where sequenceflowname = 'APV_OUTBOUND' and transactiontype = ASN and exceptioncode = a.exceptioncode) ) )
and a.status = 'New'
REgards,
N.Senthil -
i have to read an excel sheet from the application server into an internal table that i hv created.can you help me to write select query &read dataset statement?
suppose the internal table name is T_a and it has fields f1 to f7 which are all present in the excel sheet.
<REMOVED BY MODERATOR>
Thanks in advance,
Anand.
Edited by: Alvaro Tejada Galindo on Feb 14, 2008 2:33 PMHi
select f1 f2 f3 f4 f5 f6 f7
from TABLE
into table T_a.
read table T_a with key f1 = <val1>.
<REMOVED BY MODERATOR>
Regards,
Mansi.
Edited by: Alvaro Tejada Galindo on Feb 14, 2008 2:33 PM -
How to create a triangle view with a select query?
I need help to build a select query that will create a triangle view.
Below is the table I have to query
*{color:#ff0000}INITIAL TABLE{color}*
*{color:#008000}AMOUNT | TRANSACTION_DATE | OPEN_DATE | TYPE{color}*
5 | 30-JAN-09 | 10-JAN-09 | A
10 | 12-JAN - 09 | 30-NOV-08 | A
20 | 30 - DEC - 08 | 15-OCT-08 | A
10 | 30 - DEC - 08 | 8 - OCT - 08 | A
*{color:#ff0000}THE FINAL TABLE I HAVE TO CREATE:{color}*
DEV_PERIOD - TO_CHAR(TRUNC(TRANSACTION_DATE,'Q'),'YYYY-Q') AS DEV_PERIOD
OPEN PERIOD - TO_CHAR(TRUNC(OPEN_DATE,'Q'),'YYYY-Q') AS OPEN_PERIOD
{color:#008000}*SUM of AMOUNT | DEV_PERIOD | OPEN_PERIOD | TYPE*{color}
5 | 2009 - 1 | 2009 - 1 | A
40 | 2009 - 1 | 2008 - 4 | A
30 | 2008 - 4 | 2008 - 4 | A
{color:#ff0000}*This is another view of the table (The triangle view)*{color}
| Dev_Period 2008- 1 | 2008 - 2| 2008 -3 | 2008 - 4 | 2009 -1 |
Open_Period |
2008 - 1..................... 0.......... 0............ 0........... 0.......... 0
2008 - 2 ..................................0............ 0........... 0.......... 0
2008 - 3................................................. 0........... 0.......... 0
2008 - 4 ..............................................................30......... 40
2009 - 1 .............................................................................5
Any ideas will be appreaciated.
Thank you!I think the first thing you need to do is look up "pivot query" in this newsgroup. And how complicated your query gets to be will depend on your database version (11 natively supports pivot queries). You have a variable number of columns in your result set (depending on how many quarters you have in your data.
I think once you get the columns sorted out, working out the numbers to put in each column will be relatively easy.
Jon -
How to write selection Query for the following requirment.
Hi All,
I am new to ABAP, I need a help ,
I need to select all plants(WERKS) from MARC at Plant/Material level,
then I need to take all sales organozation(VKORG) from T001w,
then I need the company code(BUKRS) from TVKO based on VKORG,
then I need the currency key(WAERS) from T001 based on BUKRS,
Can any one help me in writing selection Query for the same?
Thanks All,
Debrup.Hi,
Its easy for you if you learn SELECT with JOIN to complete your task. So SEARCH the forum with SELECT statement and you will get a lot of examples using which you can write your own.
If you struck up anywhere revert back.
Regards
Karthik D -
Complex select query read in Java
I want to use a custom complex select query with join of multiple tables Explicitly to read the object which itself is associated with other object through one-to-many mapping. The objects have been generated through Toplink without Indirection.
The scenario is like this:
Table: Purchase_Order Object: PurchaseOrder
2nd Table: Purchase_Order_Line Object: PurchaseOrderLine
Relationship is one-to-many between Purchase_Order and Purchase_Order_Line. Corresponding to this, PurchaseOrder has the Collection of PurchaseOrderLine without indirection.
I want to override the internal approach of Toplink by my custom select query to fetch a few attributes only. I tried it in some way but it does not return me PurchaseOrderLine collection.
Please elaborate what should be the approach to run such query in Java using Toplink API?
Thanks in advance!Could you include the query that you have currently tried.
TopLink 9.0.4 did not support joining 1-m relationships, so this would not be possible, but TopLink 10.1.3 did add this support. You would need to add the 1-m joined attribute to the query to be able to use SQL that joins the 1-m relationship.
In terms of only selecting partial objects, you would need to enable partial object reading on the query to only have some of the object's attributes built, but I believe that 1-m joins are not currently supported for partial object reading.
You may also consider using batch reading on the 1-m in TopLink, as batch reading is more efficient at reading 1-m relationships than joining. -
Hello,
I am using oracle 9i and windows XP:
Please help me to making a query to get output as mentioned below:
create table myt(col1 varchar2(10));
insert into myt values('TABLE1');
insert into myt values('TABLE2');
insert into myt values('TABLE3');
COMMIT;
create table table1(name varchar2(10),amount number);
create table table2(name varchar2(10),amount number);
create table table3(name varchar2(10),amount number);
insert into table1 values('James',1000);
insert into table1 values('David',1500);
insert into table1 values('James',2000);
insert into table1 values('David',1735);
insert into table2 values('Menon',500);
insert into table2 values('Martin',700);
COMMIT;
Required Output:
Table Name
Table1
James: 3000
David: 3235
Sum: 6235
Table2
Menon: 500
Martin: 700
Sum: 1200
-------RegardsIn your solution i added some modifications and got the output:
declare
cr_lf varchar2(2) := chr(13) || chr(10);
the_cursor sys_refcursor;
the_sql varchar2(4000) := 'select * from ' || cr_lf || '(' || cr_lf;
a_table varchar2(10);
ln varchar2(10);
a_name varchar2(10);
an_amount number:=0;
tan_amt number:=0;
i number;
j varchar2(4000);
begin
for the_row in (select col1 from myt) loop
the_sql := the_sql || 'select ''' || the_row.col1 || ''',name,sum(amount) from ' || the_row.col1 || ' group by name ' || cr_lf;
the_sql := the_sql || 'union all' || cr_lf;
end loop;
the_sql := substr(the_sql,1,length(the_sql) - 11) || ')' || cr_lf;
i := 1;
j := instr(the_sql,cr_lf,i);
while i > 0 loop
exit when j = 0;
dbms_output.put_line(substr(the_sql,i,j - i));
i := j + 2;
j := instr(the_sql,cr_lf,i);
end loop;
dbms_output.put_line(substr(the_sql,i));
--dbms_output.put_line(the_sql);
open the_cursor for the_sql;
dbms_output.put_line('--------------------------------------------------------------------------');
dbms_output.put_line(rpad('TABLE',20) || ' ' || rpad('NAME',20) || ' ' || rpad('AMOUNT',20));
dbms_output.put_line('--------------------------------------------------------------------------');
loop
ln:= a_table;
fetch the_cursor into a_table,a_name,an_amount;
exit when the_cursor%notfound;
if ln<>a_table then
dbms_output.put_line('--------------------------------------------------------------------------');
dbms_output.put_line(rpad('SUM',40) || lpad(to_char(tan_amt),10));
dbms_output.put_line('--------------------------------------------------------------------------');
tan_amt:=0;
end if;
tan_amt:= tan_amt+an_amount;
dbms_output.put_line(rpad(a_table,20) || ' ' || rpad(a_name,20) || ' ' || rpad(an_amount,20));
end loop;
dbms_output.put_line('--------------------------------------------------------------------------');
--dbms_output.put_line(rpad('SUM',45) || to_char(tan_amt));
dbms_output.put_line(rpad('SUM',40) || lpad(to_char(tan_amt),10));
dbms_output.put_line('--------------------------------------------------------------------------');
close the_cursor;
end;
select * from
select 'TABLE1',name,sum(amount) from TABLE1 group by name
union all
select 'TABLE2',name,sum(amount) from TABLE2 group by name
union all
select 'TABLE3',name,sum(amount) from TABLE3 group by name
TABLE NAME AMOUNT
TABLE1 David 6470
TABLE1 James 6000
SUM 12470
TABLE2 Martin 1400
TABLE2 Menon 1000
SUM 2400
--------------------------------------------------------------------------So many thanks for providing solution to me.
Regards -
Unknown Column Name "XYZ" not detemined untill runtime.Select query.
Hi,
I have written a query in ABAP.I am getting following error.Can some one help me resolve this.There is a column "LANDX" in standard table T005 of PI which i need to get values from. The problem is that the column is visible only at runtime and not otherwise.How can i fetch data from this coulmn writing a select query for this.
Query written is:
SELECT landx from T005 into table it_t005.
Error:
"Unknown column name "XYZ" not determined untill runtime,you cannot specify a field list."Hi Deepika u were right. that there is a landx field but it is included in that table.
so u cant exactly get it.
now u can get ur country name and iso code just like this.
tables: t005t , t005.
data: BEGIN OF it OCCURS 100,
landx like t005t-landx,
intca like t005-intca,
END OF it.
SELECT t005t~landx t005~intca into CORRESPONDING FIELDS OF TABLE it
from T005t
INNER JOIN t005 on ( t005t~land1 = t005~land1 ).
it is fulfilling ur need.
Edited by: Matt on Feb 3, 2009 7:49 AM - Please don't use txtspk -
Concatenate name in select query...
Hi Pals,
I was wondering how to directly concetenate client name in the select query itself...
Currently the code says :
SELECT SINGLE NAME1 NAME2
INTO (V_NAME1,V_NAME2)
FROM KNA1
WHERE KUNNR = I_PROJ-ZZCLIENT.
CONCATENATE V_NAME1 V_NAME2 INTO I_PROJ-CLNAME SEPARATED BY SPACE.
Can we say some thing like...
SELECT SINGLE ( NAME1 + ' ' + NAME2 ) AS CLNAME
INTO I_PROJ-CLNAME
FROM KNA1
WHERE KUNNR = I_PROJ-ZZCLIENT.
But its giving error...
Basically i need a single select query which would give me space seperated clientname in I_PROJ directly
Please help me...
Regards,
Abhishek B.Hi Abhishek,
OPEN SQL.
1. Sap works on the concept of Open Sql.
ie. Sql is database independent.
2. ABAP Syntax does not have provision for
using such EXPRESSIONS (like concatenate)
directly in SQL.
3. However u may use them in Native Sql.
4. In open sql one can use aggregate functions
like SUM COUNT etc.
But Concatenate is not allowed.
Hope u find the answer useful.
(To newbees)
U may please award points (if u find the reply useful)
by clicking on the STAR on the left of the reply.
Regards,
Amit M. -
Please help me what other way i can tune this select query..
Hello Guru,
I have a select query which retrieve data from 10 tables and around 4 tables having 2-4 Lac record and rest are having 80,000 - 1 Lac record.
It is taking around 7-8 seconds to fetch 55000 record.
I was strictly told by the client that i should not use HINTS in my query. My query is below. Please help me what other way i can tune this select query..
select
CT.CUST_ID
,CT.ROMANISED_SURNAME
,CT.SURNAME
,CT.ROMANISED_GIVEN_NAME
,CT.GIVEN_NAME
,CT.ROMANISED_MIDDLE_NAME
,CT.MIDDLE_NAME
,CT.ROMANISED_NAME_SUFFIX
,CT.NAME_SUFFIX
,CT.ROMANISED_TITLE
,CT.TITLE
,CT.ROMANISED_NAME_INITIALS
,CT.NAME_INITIALS
,CT.NAME_TEXT
,CT.CUST_JRNY_ID
,RK.REMARK_TYPE
,RK.REMARK_ID+CT.CUST_ID as REMARK_ID
,RK.REMARK_STATUS
,RK.REMARK_TEXT
,RK.HOST_ONLY_IND
,RK.SUPERVISORY_IND
,RK.CUST_COMM_IND
,RK.REMARK_SEQ
,RK.REMARK_CODE
,RK.DEFAULT_CUST_REL_IND
,RK.DEFAULT_FLIGHT_SEG_REL_IND
,RK.IATA_CODE
,RK.ICAO_CODE
,CJ.RECORD_LOCATOR "SITA_RECORD_LOCATOR"
,Cjv.Record_Locator "ORIGINATOR_RECORD_LOCATOR"
,FS.TRAVELLING_GROUP_CODE
,CG.GROUP_NAME
FROM FLIGHT_LEG FL
,CUST_FLIGHT_LEG CFL
,CUST CT
,CUST_REMARK CTR
,REMARK RK
,FLIGHT_SEG_FLIGHT_LEG FSFL
,FLIGHT_SEG FS
,CUST_JRNY CJ
,CUST_JRNY_VERSION CJV
,CUST_GROUP CG
WHERE FL.OPR_FLIGHT_NUMBER = 1--I_OPR_FLIGHT_NUMBER
and FL.HISTORY_VERSION_NUMBER = 0
and FL.DEPARTURE_STATION_CODE = 'DEL'--I_DEPARTURE_STATION_CODE
and FL.DEPARTURE_DATETIME = TO_DATE('10-DEC-2012 18.45.00', 'DD-MON-YYYY HH24.MI.SS')
and FL.OPR_SERVICE_PROVIDER_CODE= 'AI'--i_opr_service_provider_code
and FL.OPR_FLIGHT_SUFFIX = 'A'--NVL(I_OPR_FLIGHT_SUFFIX, FL.OPR_FLIGHT_SUFFIX)
AND FL.FLIGHT_LEG_ID = CFL.FLIGHT_LEG_ID
AND CFL.CUST_ID = CT.CUST_ID
AND FL.FLIGHT_LEG_ID=FSFL.FLIGHT_LEG_ID
AND FSFL.FLIGHT_SEG_ID=FS.FLIGHT_SEG_ID
AND CT.CUST_ID = CTR.CUST_ID(+)
AND CTR.REMARK_ID = RK.REMARK_ID(+)
AND FL.CUST_JRNY_ID = CJ.CUST_JRNY_ID
and CJ.CUST_JRNY_ID = CJV.CUST_JRNY_ID
AND CG.CUST_JRNY_ID(+) = CT.CUST_JRNY_ID
AND CFL.HISTORY_VERSION_NUMBER = 0
AND CT.HISTORY_VERSION_NUMBER = 0
AND NVL(CTR.HISTORY_VERSION_NUMBER,0) = 0
AND NVL(RK.HISTORY_VERSION_NUMBER,0) = 0
AND FS.HISTORY_VERSION_NUMBER = 0
AND FSFL.HISTORY_VERSION_NUMBER = 0
-- AND CJ.HISTORY_VERSION_NUMBER = 0
and CJV.VERSION_NUMBER = 0 --- Need to check
AND NVL(CG.HISTORY_VERSION_NUMBER,0) = 0
order by CT.CUST_JRNY_ID,CT.CUST_ID;
The Tables having record:
select COUNT(*) from FLIGHT_LEG -----241756
select COUNT(*) from CUST_FLIGHT_LEG---632585
select COUNT(*) from CUST---240015
select COUNT(*) from CUST_REMARK---73724
select COUNT(*) from REMARK---73654
select COUNT(*) from FLIGHT_SEG_FLIGHT_LEG---241789
select COUNT(*) from FLIGHT_SEG----260004
select COUNT(*) from CUST_JRNY----74288
select COUNT(*) from CUST_JRNY_VERSION----74477
select COUNT(*) from CUST_GROUP----55819
Thanks,
HP..Plan hash value: 3771714931
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time | Pstart| Pstop |
| 0 | SELECT STATEMENT | | 10239 | 2949K| | 7515 (1)| 00:01:31 | | |
| 1 | SORT ORDER BY | | 10239 | 2949K| 3160K| 7515 (1)| 00:01:31 | | |
|* 2 | HASH JOIN | | 10239 | 2949K| | 6864 (1)| 00:01:23 | | |
| 3 | PARTITION HASH ALL | | 73687 | 1079K| | 417 (1)| 00:00:06 | 1 | 512 |
|* 4 | TABLE ACCESS FULL | CUST_JRNY_VERSION | 73687 | 1079K| | 417 (1)| 00:00:06 | 1 | 512 |
|* 5 | HASH JOIN | | 10239 | 2799K| | 6445 (1)| 00:01:18 | | |
| 6 | PARTITION HASH ALL | | 73654 | 863K| | 178 (1)| 00:00:03 | 1 | 512 |
| 7 | TABLE ACCESS FULL | CUST_JRNY | 73654 | 863K| | 178 (1)| 00:00:03 | 1 | 512 |
|* 8 | FILTER | | | | | | | | |
|* 9 | HASH JOIN RIGHT OUTER | | 10239 | 2679K| | 6267 (1)| 00:01:16 | | |
| 10 | PARTITION HASH ALL | | 55315 | 756K| | 137 (1)| 00:00:02 | 1 | 512 |
| 11 | TABLE ACCESS FULL | CUST_GROUP | 55315 | 756K| | 137 (1)| 00:00:02 | 1 | 512 |
|* 12 | FILTER | | | | | | | | |
|* 13 | HASH JOIN OUTER | | 10240 | 2540K| 2056K| 6129 (1)| 00:01:14 | | |
|* 14 | FILTER | | | | | | | | |
|* 15 | HASH JOIN RIGHT OUTER | | 10242 | 1930K| | 5531 (1)| 00:01:07 | | |
| 16 | INDEX FAST FULL SCAN | CUST_REMARK_PK | 73677 | 935K| | 190 (0)| 00:00:03 | | |
|* 17 | HASH JOIN | | 10257 | 1802K| | 5339 (1)| 00:01:05 | | |
|* 18 | HASH JOIN | | 10257 | 701K| | 3516 (1)| 00:00:43 | | |
|* 19 | HASH JOIN | | 3963 | 220K| | 2476 (1)| 00:00:30 | | |
|* 20 | HASH JOIN | | 3963 | 181K| | 1300 (1)| 00:00:16 | | |
| 21 | PARTITION HASH ALL | | 3963 | 131K| | 728 (1)| 00:00:09 | 1 | 512 |
|* 22 | TABLE ACCESS FULL | FLIGHT_LEG | 3963 | 131K| | 728 (1)| 00:00:09 | 1 | 512 |
|* 23 | INDEX FAST FULL SCAN| FLIGHT_SEG_FLIGHT_LEG_PK | 240K| 3059K| | 571 (1)| 00:00:07 | | |
| 24 | PARTITION HASH ALL | | 259K| 2531K| | 1175 (1)| 00:00:15 | 1 | 512 |
|* 25 | TABLE ACCESS FULL | FLIGHT_SEG | 259K| 2531K| | 1175 (1)| 00:00:15 | 1 | 512 |
| 26 | PARTITION HASH ALL | | 631K| 8011K| | 1037 (1)| 00:00:13 | 1 | 512 |
|* 27 | TABLE ACCESS FULL | CUST_FLIGHT_LEG | 631K| 8011K| | 1037 (1)| 00:00:13 | 1 | 512 |
| 28 | PARTITION HASH ALL | | 239K| 25M| | 1822 (1)| 00:00:22 | 1 | 512 |
|* 29 | TABLE ACCESS FULL | CUST | 239K| 25M| | 1822 (1)| 00:00:22 | 1 | 512 |
| 30 | PARTITION HASH ALL | | 73623 | 4385K| | 243 (1)| 00:00:03 | 1 | 512 |
| 31 | TABLE ACCESS FULL | REMARK | 73623 | 4385K| | 243 (1)| 00:00:03 | 1 | 512 |
Predicate Information (identified by operation id):
2 - access("CJ"."CUST_JRNY_ID"="CJV"."CUST_JRNY_ID")
4 - filter("CJV"."VERSION_NUMBER"=0)
5 - access("FL"."CUST_JRNY_ID"="CJ"."CUST_JRNY_ID")
8 - filter(NVL("CG"."HISTORY_VERSION_NUMBER",0)=0)
9 - access("CG"."CUST_JRNY_ID"(+)="CT"."CUST_JRNY_ID")
12 - filter(NVL("RK"."HISTORY_VERSION_NUMBER",0)=0)
13 - access("CTR"."REMARK_ID"="RK"."REMARK_ID"(+))
14 - filter(NVL("CTR"."HISTORY_VERSION_NUMBER",0)=0)
15 - access("CT"."CUST_ID"="CTR"."CUST_ID"(+))
17 - access("CFL"."CUST_ID"="CT"."CUST_ID")
18 - access("FL"."FLIGHT_LEG_ID"="CFL"."FLIGHT_LEG_ID")
19 - access("FSFL"."FLIGHT_SEG_ID"="FS"."FLIGHT_SEG_ID")
20 - access("FL"."FLIGHT_LEG_ID"="FSFL"."FLIGHT_LEG_ID")
22 - filter("FL"."DEPARTURE_STATION_CODE"='DEL' AND "FL"."DEPARTURE_DATETIME"=TO_DATE(' 2012-12-10 18:45:00', 'syyyy-mm-dd
hh24:mi:ss') AND "FL"."OPR_SERVICE_PROVIDER_CODE"='AI' AND "FL"."OPR_FLIGHT_NUMBER"=1 AND "FL"."OPR_FLIGHT_SUFFIX"='A' AND
"FL"."HISTORY_VERSION_NUMBER"=0)
23 - filter("FSFL"."HISTORY_VERSION_NUMBER"=0)
25 - filter("FS"."HISTORY_VERSION_NUMBER"=0)
27 - filter("CFL"."HISTORY_VERSION_NUMBER"=0)
29 - filter("CT"."HISTORY_VERSION_NUMBER"=0) -
Select query for sales order for particular customer oder text and storage
Hi All,
I am trying to retriev customer order text and customer storage bin from the following select query, but it's giving huge number of records, I want to restrict the number of records.
Select customer order text, customer storage bin
Select STXHTDOBJECT, STXHTDID
Where TDOBJECT = VBBP
TDID = Y001
TDID = Y007
Please let me know how to restirct the number of records.
Thanks,
RanjanTry using the FM 'READ_TEXT'.
NAME will be the order number concatenated with the item number.
And you have the ID and OBJECT. You may also need to use the LANGUAGE.
Message was edited by:
Matt Nagel -
Select query help for Sales order
Hi Experts,
I have to write a select query to fetch sales orders which are open along with the quantities which are open ( not delivered). What would the best approach for this?
Any help is appreciated. Expecting code samples....Thanks
Thanks
Rickyhi,
do like this,
write a select query for vbak and vbuk as follows.
delivery status field is <b>lfstk</b> from <b>vbuk</b>,
and relation field is <b>vbeln</b> from the both the tables.
reward points if useful,
regards,
seshu.
Maybe you are looking for
-
F4 help needed in Process on value-request
Hi, I have two fields on screen: region and its description in a dialog program. I want region description to be populated as soon as I select F4 help for region. Description field is output only . I want to do it using a module in Process On value-
-
I'm asked to develop a report that should display output based on either dept wise or supplier wise Select Im.Item ItemID,Gp.Division Division, Deps.Group_No Group_No,Is1.Supplier Supplier ,soh.stock_on_hand stock_on_hand,im.dept,soh.loc From Item_Ma
-
Launch another app from Siena app
As it's not possible to launch a map in Siena, I'm hoping that I can pass an address out of Siena to the native Maps app in Windows 8. Is that possible? I can't find any documentation on how to open other apps from my app.
-
I moved system preferences to trash and probably need to reboot computer help! I also cant open iphoto
-
I am converting several documents that were submitted to me as a PDF, to PDF/A format. More often that not, a font error is returned when I run the Preflight. Is there any way I can fix this error at this point? Suggestions? I don't have access to th