To re-write query using 'ANY' operator
Hi,
How to write the given query using 'ANY ' operator , I dont need to fetch to grade_master table twice in database, just need to fetch within the result set.
SELECT dsg_code,dsg_name,dsg_grade FROM designation_master WHERE dsg_orgn='&&Orgn' and dsg_ctry='&&ctry'
And dsg_loc ='&&loc' And dsg_oru = '&&oru' and dsg_grade in decode('&&radio_group',
1, SELECT grd_code FROM grade_master WHERE grd_osm_code in (Select grd_osm_code FROM grade_master WHERE grd_orgn='&&Orgn' and grd_ctry='&&ctry' And grd_loc ='&&loc' And grd_oru = '&&oru' and grd_code ='&&emp_grade'),
2, SELECT grd_code FROM grade_master WHERE grd_osm_code > (Select grd_osm_code FROM grade_master WHERE grd_orgn='&&orgn' and grd_ctry='&&ctry' and grd_loc ='&&loc' And grd_oru = '&&oru' and grd_code),
3, SELECT grd_code FROM grade_master WHERE grd_osm_code < (Select grd_osm_code FROM grade_master WHERE grd_orgn='&&orgn' and grd_ctry='&&ctry' And grd_loc ='&&loc' And grd_oru = '&&oru' and grd_code ='&&emp_grade'))
thanks
rincy
Tubby is correct that data and create statements are required to analyze it correctly.
Still I worked on it and created something using WITH clause
with grd_query
as
(Select grd_osm_code FROM grade_master WHERE grd_orgn='&&orgn' and grd_ctry='&&ctry' and grd_loc ='&&loc' And grd_oru = '&&oru' and grd_code ='&&emp_grade')
,grd_mst_query
as
(SELECT grd_code, grd_osm_code FROM grade_master)
SELECT dsg_code, dsg_name, dsg_grade
FROM designation_master
WHERE dsg_orgn = '&&Orgn'
AND dsg_ctry = '&&ctry'
AND dsg_loc = '&&loc'
AND dsg_oru = '&&oru'
AND dsg_grade in
decode('&&radio_group',1, (SELECT grd_code FROM grd_mst_query WHERE grd_osm_code in (select * from grd_query)),
2, (SELECT grd_code FROM grd_mst_query WHERE grd_osm_code > (select * from grd_query)),
3, (SELECT grd_code FROM grd_mst_query WHERE grd_osm_code < (select * from grd_query)))this should avoid multiple scans on same table.
thanks
Similar Messages
-
How to write the given query using 'ANY ' operator
Hi,
How to write the given query using 'ANY ' operator , I dont need to fetch to grade_master table twice in database, just need to fetch within the result set.
SELECT dsg_code,dsg_name,dsg_grade FROM designation_master WHERE dsg_orgn='&&Orgn' and dsg_ctry='&&ctry'
And dsg_loc ='&&loc' And dsg_oru = '&&oru' and dsg_grade in decode('&&radio_group',
1, SELECT grd_code FROM grade_master WHERE grd_osm_code in (Select grd_osm_code FROM grade_master WHERE grd_orgn='&&Orgn' and grd_ctry='&&ctry' And grd_loc ='&&loc' And grd_oru = '&&oru' and grd_code ='&&emp_grade'),
2, SELECT grd_code FROM grade_master WHERE grd_osm_code > (Select grd_osm_code FROM grade_master WHERE grd_orgn='&&orgn' and grd_ctry='&&ctry' and grd_loc ='&&loc' And grd_oru = '&&oru' and grd_code),
3, SELECT grd_code FROM grade_master WHERE grd_osm_code < (Select grd_osm_code FROM grade_master WHERE grd_orgn='&&orgn' and grd_ctry='&&ctry' And grd_loc ='&&loc' And grd_oru = '&&oru' and grd_code ='&&emp_grade'))
thanks
rincyHi,
One thing I understood my your issue is you want to perform, execution of query once or fetch the results sets my minimizing the number of times executions of queries. It would be hard for us to check in this way, atleast provide some temporary data and some business rules. Only I can IN, >, < (queries logical conditons on inner query)
- Pavan Kumar N
- ORACLE OCP - 9i/10g
https://www.oracleinternals.blogspot.com -
Re-write query with ANY operator
Hi,
How to write the given query using 'ANY ' operator , I dont need to fetch to grade_master table twice in database, just need to fetch within the result set.
SELECT dsg_code,dsg_name,dsg_grade FROM designation_master WHERE dsg_orgn='&&Orgn' and dsg_ctry='&&ctry'
And dsg_loc ='&&loc' And dsg_oru = '&&oru' and dsg_grade in decode('&&radio_group',
1, SELECT grd_code FROM grade_master WHERE grd_osm_code in (Select grd_osm_code FROM grade_master WHERE grd_orgn='&&Orgn' and grd_ctry='&&ctry' And grd_loc ='&&loc' And grd_oru = '&&oru' and grd_code ='&&emp_grade'),
2, SELECT grd_code FROM grade_master WHERE grd_osm_code > (Select grd_osm_code FROM grade_master WHERE grd_orgn='&&orgn' and grd_ctry='&&ctry' and grd_loc ='&&loc' And grd_oru = '&&oru' and grd_code),
3, SELECT grd_code FROM grade_master WHERE grd_osm_code < (Select grd_osm_code FROM grade_master WHERE grd_orgn='&&orgn' and grd_ctry='&&ctry' And grd_loc ='&&loc' And grd_oru = '&&oru' and grd_code ='&&emp_grade'))
thanks
rincyplease post your question in separate SQL and PL/SQL section this is FORMS section
-
Writing query using UNION Operator
Question -
(1)
Write an SQL Statement to list the following items: Customer ID, Customer Name, number of invoices, sum of total for invoices. Ensure that all customers are returned in the result set.
Answer for the above is written as below by one person. That seams to be correct. Is there another way of writing this same query.;
select c.CUSTOMER_ID,c.NAME,i.cnt,i.s
from gee_customer c,(select customer_id,count(*) as cnt, sum(TOTAL) as s
from gee_invoice
group by customer_id) i
where c.CUSTOMER_ID = i.customer_id (+)
(2)
My other question is How to write the above answer (or what you sugest) using UNION operator ?
Any ideas please
Message was edited by:
user483578In fact the outer join means you use the union of two result sets - usual join result
and the rows from the outer table for which there is not any row in the inner table.
SQL> select d.deptno, e.ename from emp e, dept d
2 where d.deptno = e.deptno(+)
3 order by 1,2
4 /
DEPTNO ENAME
10 CLARK
10 KING
10 MILLER
20 ADAMS
20 FORD
20 JONES
20 SCOTT
20 SMITH
30 ALLEN
30 BLAKE
30 JAMES
30 MARTIN
30 TURNER
30 WARD
40
15 rows selected.
SQL> select d.deptno,e.ename from emp e, dept d
2 where d.deptno = e.deptno
3 union
4 select deptno, null
5 from dept d where not exists (select null from emp e where e.deptno = d.deptno)
6 order by 1,2
7 /
DEPTNO ENAME
10 CLARK
10 KING
10 MILLER
20 ADAMS
20 FORD
20 JONES
20 SCOTT
20 SMITH
30 ALLEN
30 BLAKE
30 JAMES
30 MARTIN
30 TURNER
30 WARD
40
15 rows selected.In your example something like (NOT tested !)
with i as (select customer_id,count(*) as cnt, sum(TOTAL) as s
from gee_invoice group by customer_id)
select c.CUSTOMER_ID,c.NAME,i.cnt,i.s
from gee_customer c, i
where c.CUSTOMER_ID = i.customer_id
union
select c.CUSTOMER_ID,c.NAME,null,null
from gee_customer c
where not exists (select null from i where c.CUSTOMER_ID = i.customer_id)
Rgds. -
How to pass variable into lov sql query using like operator
hi.
i want to use a lov where i want to pass a variable using like operator.
my query is
select empno,name from table where empno like ':ed%';
my empno is A001 TO A199 AND B001 TO B199 so i want show either A% or B% empno
how can i do this ?
reagrdskindly press Shift+F1 at a time you face this error to see the exact Oracle error message.
and provide us with that detail
and its better if you start new topic for that error... because that will be new error,,,
-- Aamir Arif
Edited by: Aamiz on Apr 7, 2010 12:27 PM -
Select Query using AND operation
Hello,
I am developing RFC which will retrieve some records from SAP HR module table.
Input will be one structure (INPUT_TABLE) containing 4 fields. User may enter values for any fields, and my requirement is to perform a AND operation on those entered fields only. Currently i am writing query as follows :
SELECT DISTINCT apernr aVORNA aNACHN acname a~gbdat FROM
PA0002 as a INTO CORRESPONDING FIELDS OF TABLE Z_PD_TABLE
WHERE apernr = INPUT_TABLE-pernr AND aVNAMC = INPUT_TABLE-VORNA AND aNCHMC = INPUT_TABLE-NACHN AND agbdat = INPUT_TABLE-GBDAT .
If only 2 values are entered by user out of 4 , it will perform AND operation by taking other values as blank or 000000. I want to skip these AND operation on fields which are not entered by user.
Please help for writing query.
Thanks in advance,
PrashantHi,
Create dynamic where condition based upon user input.
Try like this....
IF NOT INPUT_TABLE-pernr IS INITIAL.
CLEAR : lv_pernr_condition.
CONCATENATE 'PERNR' ' = ' '''' INPUT_TABLE-pernr '''' INTO
lv_pernr_condition.
ENDIF.
IF NOT INPUT_TABLE-vnamc IS INITIAL.
CLEAR : lv_vnamc_condition.
CONCATENATE 'VNAMC' ' = ' '''' INPUT_TABLE-vnamc '''' INTO
lv_vnamc_condition.
ENDIF.
IF NOT INPUT_TABLE-vorna IS INITIAL.
CLEAR : lv_vorna_condition.
CONCATENATE 'VORNA' ' = ' '''' INPUT_TABLE-vorna '''' INTO
lv_vorna_condition.
ENDIF.
IF NOT INPUT_TABLE-nchmc IS INITIAL.
CLEAR : lv_nchmc_condition.
CONCATENATE 'NCHMC' ' = ' '''' INPUT_TABLE-nchmc '''' INTO
lv_nchmc_condition.
ENDIF.
IF NOT INPUT_TABLE-gbdat IS INITIAL.
CLEAR : lv_gbdat_condition.
CONCATENATE 'GBDAT' ' = ' '''' INPUT_TABLE-gbdat '''' INTO
lv_gbdat_condition.
ENDIF.
IF NOT lv_pernr_condition IS INITIAL.
CONCATENATE lv_pernr_condition lv_condition
INTO lv_condition SEPARATED BY space.
ENDIF.
IF NOT lv_vnamc_condition IS INITIAL.
IF lv_condition IS INITIAL.
CONCATENATE lv_vnamc_condition lv_condition
INTO lv_condition SEPARATED BY space.
ELSE.
CONCATENATE lv_condition 'AND' lv_vnamc_condition
INTO lv_condition SEPARATED BY space.
ENDIF.
ENDIF.
IF NOT lv_vorna_condition IS INITIAL.
IF lv_condition IS INITIAL.
CONCATENATE lv_vorna_condition lv_condition
INTO lv_condition SEPARATED BY space.
ELSE.
CONCATENATE lv_condition 'AND' lv_vorna_condition
INTO lv_condition SEPARATED BY space.
ENDIF.
ENDIF.
IF NOT lv_nchmc_condition IS INITIAL.
IF lv_condition IS INITIAL.
CONCATENATE lv_nchmc_condition lv_condition
INTO lv_condition SEPARATED BY space.
ELSE.
CONCATENATE lv_condition 'AND' lv_nchmc_condition
INTO lv_condition SEPARATED BY space.
ENDIF.
ENDIF.
IF NOT lv_gbdat_condition IS INITIAL.
IF lv_condition IS INITIAL.
CONCATENATE lv_gbdat_condition lv_condition
INTO lv_condition SEPARATED BY space.
ELSE.
CONCATENATE lv_condition 'AND' lv_gbdat_condition
INTO lv_condition SEPARATED BY space.
ENDIF.
ENDIF.
SELECT DISTINCT pernr VORNA NACHN cname gbdat FROM
PA0002 INTO CORRESPONDING FIELDS OF TABLE Z_PD_TABLE
WHERE lv_condition . " Dynamic where condition
Hope it will helps -
Issue with query using minus operation
Hello All,
I have data set of all organization numbers like as below
Dataset:
('528801','528802','536101','536102','100601','536401','536402','530701','536501','536502','540501','599101','133301',
'531101','143101','536601','536602','534401','535501','535401','536801','536802','531001','537501','537502','540601','540801','528401')
And i also have a table W_INT_ORG_D where in it has column like ORG_NUM which holds the organization numbers in the database, now i am trying to find out the exclusive organization numbers in the data set that does not exist in W_INT_ORG_D using some oracle sql query.
Below is the sql i wrote though my query is wrong probably you could able to understand what i am trying to say or achieve, i am not ok with creating another table and filling in the data and later compare both tables, i want to do that without creating any extra table. Please let me know if you have any idea to do this, appreciate your time.
Query:_
WITH ABC AS
('528801','528802','536101','536102','100601','536401','536402','530701','536501','536502','540501','599101','133301',
'531101','143101','536601','536602','534401','535501','535401','536801','536802','531001','537501','537502','540601','540801','528401')
SELECT DISTINCT ORG_NUM
FROM W_INT_ORG_D, ABC
WHERE DATASOURCE_NUM_ID='211'
AND ORG_NUM IN
('528801','528802','536101','536102','100601','536401','536402','530701','536501','536502','540501','599101','133301',
'531101','143101','536601','536602','534401','535501','535401','536801','536802','531001','537501','537502','540601','540801','528401')
MINUS
SELECT * FROM ABC
Thanks,
SamThis wil give a list of organization numbers in dataset that are not present in the view:
SELECT column_value org_num
FROM TABLE(sys.odciVarchar2List(
'528801',
'528802',
'536101',
'536102',
'100601',
'536401',
'536402',
'530701',
'536501',
'536502',
'540501',
'599101',
'133301',
'531101',
'143101',
'536601',
'536602',
'534401',
'535501',
'535401',
'536801',
'536802',
'531001',
'537501',
'537502',
'540601',
'540801',
'528401'
MINUS
SELECT DISTINCT ORG_NUM
FROM W_INT_ORG_D
WHERE DATASOURCE_NUM_ID='211'
/SY.
Edited by: Solomon Yakobson on Jun 29, 2009 10:49 AM -
Using in operator with bindveriable
Dear All,
i facing proplem when i try to make SQL query using "in" operator but i send value as bind virable
example
Select emp.emp_id
from emp
where emp.emp_id in (:pEmpId)
but when i execute it and enter value for the bind i didn't get the result .
any idea how to solve this problem
Best RegardsSomething like this will work (10g onwards)
SQL> ed
Wrote file afiedt.buf
1 with req as (select '&required_empnos' as empno from dual)
2 --
3 select *
4 from emp
5 where empno in
6 (select regexp_substr(empno, '[^,]+', 1, rownum)
7 from req
8* connect by rownum <= length(regexp_replace(empno, '[^,]'))+1)
SQL> /
Enter value for required_empnos: 7839,7499,7934
old 1: with req as (select '&required_empnos' as empno from dual)
new 1: with req as (select '7839,7499,7934' as empno from dual)
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7839 KING PRESIDENT 17-NOV-81 5000 10
7934 MILLER CLERK 7782 23-JAN-82 1300 10
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
SQL> -
Problem when using About Operator in Contains Query
Hi,
I'm new to Oracle and this forums too. I have a problem when using about operator in contains query.
I create a table with some records and then create a context index on 'name' column.
CREATE TABLE my_items (
id NUMBER(10) NOT NULL,
name VARCHAR2(200) NOT NULL,
description VARCHAR2(4000) NOT NULL,
price NUMBER(7,2) NOT NULL
ALTER TABLE my_items ADD (
CONSTRAINT my_items_pk PRIMARY KEY (id)
CREATE SEQUENCE my_items_seq;
INSERT INTO my_items VALUES(my_items_seq.nextval, 'Car', 'Car description', 1);
INSERT INTO my_items VALUES(my_items_seq.nextval, 'Train', 'Train description', 2);
INSERT INTO my_items VALUES(my_items_seq.nextval, 'Japan', 'Japan description', 3);
INSERT INTO my_items VALUES(my_items_seq.nextval, 'China', 'China description', 4);
COMMIT;
EXEC ctx_ddl.create_preference('english_lexer','basic_lexer');
EXEC ctx_ddl.set_attribute('english_lexer','index_themes','yes');
EXEC ctx_ddl.set_attribute('english_lexer','theme_language','english');
CREATE INDEX my_items_name_idx ON my_items(name) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS('lexer english_lexer');
EXEC ctx_ddl.sync_index('my_items_name_idx');Then I perform contains query to retrieve record :
SELECT count(*) FROM my_items WHERE contains(name, 'Japan', 1) > 0;
COUNT(*)
1
SELECT count(*) FROM my_items WHERE contains(name, 'about(Japan)', 1) > 0;
COUNT(*)
1But the problem is when I using ABOUT operator like in Oracle's English Knowledge Base Category Hierarchy it return 0
SELECT count(*) FROM my_items WHERE contains(name, 'about(Asia)', 1) > 0;
COUNT(*)
0
SELECT count(*) FROM my_items WHERE contains(name, 'about(transportation)', 1) > 0;
COUNT(*)
0I can't figure out what 's wrong in my query or in my index.
Any help will be appreciated.
Thanks,
Hieu Nguyen
Edited by: user2944391 on Jul 10, 2009 3:25 AMHello (and welcome),
You'd be best asking this question in the Oracle Text forum, here:
Text
And by the way, it will help others to analyse if you put {noformat}{noformat} (lowercase code in curly brackets) before and after your code snippets.
Good luck! -
How to use 'about' operator in Full text search query?
Hi all,
I have to search the following string in full text index using 'about' operator.
'Advertisment(Cosmetics) Assets'
If use the following query
SELECT keyword_id
FROM mam_keyword_languages
WHERE contains(fts_text_uc, convert('about(Advertisment(Cosmetics) Assets)',
'WE8MSWIN1252', 'WE8MSWIN1252')) > 0
ORDER BY nlssort(text, 'NLS_SORT=EEC_EUROPA3')
It gives following error.
ERROR at line 1:
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-50901: text query parser syntax error on line 1, column 37
How can i do this search? Is there any other way?
Thanx in advance.
T.UmapathySum((postab.subtotal)*(loc.royalty)/100)
Is there any other way to take product of two
attributs? your help will be greatly appreciated as
it is really stumbling block in my project. Thanks in
advanceSuch a stumbling block should have inspired more activity on your part.
I'd try rewriting it like this:
sum(postab.subtotal*loc.royalty/100)[/b]% -
Xpath query using greater than operator
I'm trying to evaluate some xml to determine if it matches some criterium.
MyXmlColumns contains the following kind of data "<Values><Value>data1</Value><Value>data2</Value><Values>"
When I execute the following query I get zero rows returned when it should match some rows containing this data.
select * from mydata
where existsNode(MyXmlColumn, '/Values/Value[. > "data1"]') = 1
The question is why greter than, lesser than, does not work, and if there is any alternative.
If I use equals operator, or greater than but using a number it works.
I know that I can use XmlExists function but I'm using Oracle 9i r2 so it's not an option.
Thanks in advance for any suggestion.but I'm using Oracle 9i r2
The question is why greter than, lesser than, does not workWorks on 9.2.0.8:
SQL> select * from v$version where rownum = 1
BANNER
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
1 row selected.
SQL> with mydata as
select xmltype('<Values><Value>data1</Value><Value>data2</Value></Values>') MyXmlColumn from dual
select * from mydata t where existsNode(t.MyXmlColumn, '/Values/Value') < 3
MYXMLCOLUMN
<Values>
<Value>data1</Value>
<Value>data2</Value>
</Values>
1 row selected. -
How to write the query using Index
Hi All,
I have to fetch the records from Database table using Index, how can i write the query using Index. Can any body plz send me the sample code.
Help Me,
Balu.Hi,
See the below Example.
select * from vbak up to 100 rows
into table t_vbak
where vbeln > v_vbeln.
sort t_vbak by vbeln descending.
read table t_vbak index 1.
Regards,
Ram
Pls reward points if helpful. -
Please help to re-write this query using exists or with
Hi please help to re-write this query using exists or with, i need to write same code for 45 day , 90 days and so on but sub query condition is same for all
SELECT SUM (DECODE (t_one_mon_c_paid_us, 0, 0, 1)) t_two_y_m_mul_ca_
FROM (SELECT SUM (one_mon_c_paid_us) t_one_mon_c_paid_us
FROM (
SELECT a.individual_id individual_id,
CASE
WHEN NVL
(b.ship_dt,
TO_DATE ('05-MAY-1955')
) >= SYSDATE - 45
AND a.country_cd = 'US'
AND b.individual_id in (
SELECT UNIQUE c.individual_id
FROM order c
WHERE c.prod_cd = 'A'
AND NVL (c.last_payment_dt,
TO_DATE ('05-MAY-1955')
) >= SYSDATE - 745)
THEN 1
ELSE 0
END AS one_mon_c_paid_us
FROM items b, addr a, product d
WHERE b.prod_id = d.prod_id
AND d.affinity_1_cd = 'ADH'
AND b.individual_id = a.individual_id)
GROUP BY individual_id)
Edited by: user4522368 on Aug 23, 2010 9:11 AMPlease try and place \ before and after you code \Could you not remove the inline column select with the following?
SELECT a.individual_id individual_id
,CASE
when b.Ship_dt is null then
3
WHEN b.ship_dt >= SYSDATE - 90
3
WHEN b.ship_dt >= SYSDATE - 45
2
WHEN b.ship_dt >= SYSDATE - 30
1
END AS one_mon_c_paid_us
FROM items b
,addr a
,product d
,order o
WHERE b.prod_id = d.prod_id
AND d.affinity_1_cd = 'ADH'
AND b.individual_id = a.individual_id
AND b.Individual_ID = o.Individual_ID
and o.Prod_CD = 'A'
and NVL (o.last_payment_dt,TO_DATE ('05-MAY-1955') ) >= SYSDATE - 745
and a.Country_CD = 'US' -
Delete COPA characteristics which not used in any operating concern
Hello SAP experts,
Please advise me on how to delete PA characteristic "WW001" created by mistake that we are hoping to delete if possible. However, when attempting to delete in KEA5, the error log appear as
Data element RKEG_WW001 is used in these table/view
CACS_S_COND_MA
JVKOMP
KOMG
KOMGF
KOMGFNEW
KOMGFOLD
KOMP
KOMPAKE
STR_KOMG
TRCON_IT_KOMP
WB2_EKOMP
And does not allow the deletion
WW001 have already been delete from the operating concerns.
Please shed some light on how to do this?
Thanks in advance for your help
YangHi,
In order to delete a characteristic you should perform
the following activities:
1. Delete the corresponding characteristics and value fields from
Customizing in all clients (this includes forms, reports, planning
layouts, and so forth). To locate characteristics and value fields, use
the appropriate where-used list in the Customizing Monitor. You can
access it by choosing Tools -> Analysis -> Check Customizing Settings
(TA KECM).
You can jump directly from the where-used list to the relevant
Customizing transaction and then delete the appropriate field there.
2. Switch to the screen for maintaining the data structure of an
operating concern (Maintain operating concern).
3. If you need to effect other changes to the datastucture for the
operating concern before making any deletions, effect those changes and
save the data structure.
4. In order to be able to select the fields of the data structure,
choose Extras -> Characteristics (or Value fields) -> Unlock.
5. Select the characteristics and value fields to be deleted and remove
them from the data structure with the "Reset fields" function.
6. Reactivate the operating concern. The system starts by checking
whether the operating concern contains any data and whether the fields
to be deleted are still being used in any Customizing settings.
7. If none of the fields are still in use, the system then starts the
re-activation. If the operating concern does not contain any data or
does not require the database system to be converted, the tables are
activated. You are then able to activate the environment for the
operating concern. In this case, the following activities no longer
apply.
If the operating concern already contains data, a system message tells
you that the database needs to be converted. If you proceed, an
activation log appears (at the top of the list).
8. Analyze the activation log. If it only contains error messages
telling you to convert the tables, proceed with the next activity.
You must otherwise remove the cause of the errors before the tables can
be converted. In this case, you should answer "No" to the next prompt,
which asks whether the conversion transaction should start.
9. If you still only receive error messages telling you to convert the
tables, choose "Back" and start the conversion.
10. Plan a job for the conversion. A list of the tables to be converted
is shown for this. If the tables only contain a small amount of data
(less than 10 000 records), then all the tables can be converted in one
job. In that case, you can select all the tables.
For larger tables, conversion should take place in several jobs.
However, you should ensure that table CE4xxxx (where xxxx = operating
concern) is the last table to be converted.
Warning. No other changes can be made to the operating concern during
the conversion.
A copy of the table is generated during the conversion. The database
system should have sufficient memory available for this copy.
To schedule conversion as a job, use the "Schedule selections" function.
You can display the current status of the conversion by selecting the
"Refresh" icon. Tables disappear from the list once they have been
converted sucessfully. If a conversion is taking a while, it is also
possible to leave the transaction. You can then continue the conversion
using DB requests -> Mass processing in one of the following ways:
With the job overview. You access this by choosing System -> Services -> Jobs.
Using the database utility transaction. You access this by choosing
Utilities -> Database Utility in the ABAP Dictionary menu.
You can use the status function to call up the status of the operating
concern during operating concern maintenance. You need to activate all tables after conversion.
11. To analyze errors that have occurred during the conversion, you can use the database utility transaction by choosing Extras -> Logs. The log
has the same name as the conversion job: TBATG-date. You can also restart the conversion with this transaction.
For more information on the database utility, choose Help -> Application
help while still in the above transaction.
12. Once you have activated all the tables in the operating concern,
generate the operating concern environment from within operating concern maintenance.
You can then use the operating concern again.
Please, refer to the IMG documentation under Controlling ->
Profitability Analysis -> Structures -> Define operating concern
-> Maintain operating concern, for further details.
It is not possible to transport information about 'deleting of
characteristics (value fields)' with transaction KE3I. Only
characteristics and value fields included in operating concern (to be
transported) are transported with KE3I. Deleted characteristics and
value fields are ignored. You have to delete these characteristics and
value fields manually in each system.
Best regards,
Maria Luisa -
Please suggest a select query / sub query with out using any subprograms or
source table: Three columns ORIGIN, DESTINATION,MILES
Origin Destination Miles
Sydney Melbourne 1000
Perth Adelaide 3000
Canberra Melbounre 700
Melbourne Sydney 1000
Brisbane Sydney 1000
Perth Darwin 4000
Sydney Brisbane 1000
out put :Three columns ORIGIN, DESTINATION,MILES
Duplicate routes are to be ignored so the output is
Origin Destination Miles
Sydney Melbourne 1000
Perth Adelaide 3000
Canberra Melbounre 700
Brisbane Sydney 1000
Perth Darwin 4000
Please suggest a select query / sub query with out using any subprograms or functions/pkgs to get the out put table.Hi,
user9368047 wrote:
... Please suggest a select query / sub query with out using any subprograms or functions/pkgs to get the out put table.Why? If the most efficient way to get the results you want involves using a function, why wouldn't you use it?
Here's one way, without any functions:
SELECT a.*
FROM source_table a
LEFT OUTER JOIN source_table b ON a.origin = b.destination
AND a.destination = b.origin
AND a.miles = b.miles
WHERE b.origin > a.origin -- Not b.origin > b.origin
OR b.origin IS NULL
;If you'd care to post CREATE TABLE and INSERT statements for your sample data, then I could test this.
Edited by: Frank Kulash on Nov 6, 2012 7:39 PM
Corrected WHERE clause after MLVrown (below)
Maybe you are looking for
-
Changing SIM to a different country
Hi everyone and especially someone who can help me please! I am in the UK on hutchinson three network using my BB bold with BIS. It is working great. Now I am going abroad to the Middle East for a couple of months on some contracting work. I have a S
-
Trying to use trial version on my Macbook pro OX 10.8.5
Hi, I was trying to download illustrator trial version on my Macbook pro and it's on 'waiting' forever. Never starts downloading... is there anything special that I should do with this? Please let me know. Many thanks!
-
7610 supernova and extremely interested nokia empl...
Hello there, Here is a long thread about a 7610 supernova mirror screen I hope someone (an employee with intelligence) from nokia will read it and help me. I got my mom 7610 supernova and it's disaster outdoors and the worst part is this has been re
-
Hey, I am trying to change the enable password on cisco ASA 5510. I run enable password <password>. I log off, and log back in with my username/password and type en, it asks for a password and enter the password that I just set but it does not work
-
How to post a new question?
I am having a problem calling a local landline through my one month free promotion on my desktop pc Everytime I called a mobile number through skype The connection dies as soon as the caller answer for a second I can only hear the hello and all of s