Problem with the MERGE statement
Hi all
We'll cover the following:
create table xx_test1 (invoice_id number, line_group_number number, LINE_TYPE_LOOKUP_CODE VARCHAR2(25) ,LINE_NUMBER NUMBER(15) );
Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,1,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,1,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,2,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,2,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,3,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,3,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,4,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,4,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,5,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,5,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,12,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,12,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,7,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,7,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,8,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,8,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,9,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,9,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,10,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,10,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,11,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,11,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,12,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,12,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,13,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,13,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,14,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,14,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,15,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,15,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,16,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,16,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,17,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,17,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,18,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,18,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,19,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,19,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,20,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,20,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,21,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,21,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,22,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,22,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,23,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,23,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,24,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,24,'TAX',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,25,'ITEM',null); Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,25,'TAX',null);
So, if we want to MERGE this table and update the lines with below:
merge into xx_test1 DST USING (SELECT LINE_GROUP_NUMBER, LINE_TYPE_LOOKUP_CODE, ROW_NUMBER() over(order by LINE_TYPE_LOOKUP_CODE, LINE_GROUP_NUMBER) as LINE_NUM from xx_test1 where INVOICE_ID = 131549 ) SRC ON (DST.LINE_GROUP_NUMBER = SRC.LINE_GROUP_NUMBER AND dst.LINE_TYPE_LOOKUP_CODE = src.LINE_TYPE_LOOKUP_CODE AND dst.invoice_id = 131549 ) WHEN MATCHED THEN update set DST.LINE_NUMBER = SRC.LINE_NUM ;
I get an error message:
SQL error: ORA-30926: failed to get a stable set of rows in the source tables
30926 00000 - "impossible to get a stable set of rows in the source tables.
* Cause: A stable set of rows could not be achieved due to the large dml
activity or one not deterministic where clause.
* Action: Remove any non deterministic of the clauses and reissue of the dml.
I don't know why I'm getting this. Any ideas?
Version: 11g
Kind regards
Alex
whenever I have this error I convert my fusion in a select to see what is duplication
select dst.LINE_GROUP_NUMBER, dst.LINE_TYPE_LOOKUP_CODE, count(*) from xx_test1 DST join (SELECT LINE_GROUP_NUMBER, LINE_TYPE_LOOKUP_CODE, ROW_NUMBER() over(order by LINE_TYPE_LOOKUP_CODE, LINE_GROUP_NUMBER) as LINE_NUM from xx_test1 where INVOICE_ID = 131549 ) SRC ON (DST.LINE_GROUP_NUMBER = SRC.LINE_GROUP_NUMBER AND dst.LINE_TYPE_LOOKUP_CODE = src.LINE_TYPE_LOOKUP_CODE AND dst.invoice_id = 131549 ) group by dst.LINE_GROUP_NUMBER, dst.LINE_TYPE_LOOKUP_CODE having count(*) > 1
you have 2 dst. LINE_GROUP_NUMBER, summer time. Combination of LINE_TYPE_LOOKUP_CODE this duplication.
Tags: Database
Similar Questions
-
problem with the insert statement
Hi all
I'm trying to insert data into xxops_forecast_extract.
There are two additional territory_id, position_id columns.
How can I insert data into xxops_forecast_extract with the update instructions below.
Columns of XXOPS_FORECAST_EXTRACT PERIOD_ORDER, SHR_NODE_ID, FORECAST_DEFN_ID, X_SALES_REP_NUM, X_SALES_REP_REF, POSITION_NAME, TERRITORY_NAME, AM_ID, POSITION_LEVEL, FORECAST_ID, PERIOD_ID, FISCAL_PERIOD, PERIOD_START_DATE, PERIOD_END_DATE, TOTAL_COMMIT_PRODUCT, TOTAL_JUDGMENT_PRODUCT, TOTAL_COMMIT_SERVICE, TOTAL_JUDGMENT_SERVICE, TOTAL_UPSIDE_PRODUCT, TOTAL_UPSIDE_SERVICE, TERRITORY_ID, POSITION_ID
Thanks in advance.INSERT INTO xxfdev.xxops_forecast_extract( PERIOD_ORDER, SHR_NODE_ID, FORECAST_DEFN_ID, X_SALES_REP_NUM, X_SALES_REP_REF, POSITION_NAME, TERRITORY_NAME, AM_ID, POSITION_LEVEL, FORECAST_ID, PERIOD_ID, FISCAL_PERIOD, PERIOD_START_DATE, PERIOD_END_DATE, TOTAL_COMMIT_PRODUCT, TOTAL_JUDGMENT_PRODUCT, TOTAL_COMMIT_SERVICE, TOTAL_JUDGMENT_SERVICE, TOTAL_UPSIDE_PRODUCT, TOTAL_UPSIDE_SERVICE ) SELECT PERIOD_ORDER, NODE_REFERENCE, FORECAST_DEFN_ID, X_SALES_REP_NUM, X_SALES_REP_REF, POSITION_NAME, TERRITORY_NAME, AM_NAME1, POSITION_LEVEL, FORECAST_ID, PERIOD_ID, FISCAL_PERIOD, PERIOD_START_DATE, PERIOD_END_DATE, TOTAL_COMMIT_PRODUCT, TOTAL_JUDGMENT_PRODUCT, TOTAL_COMMIT_SERVICE, TOTAL_JUDGMENT_SERVICE, TOTAL_UPSIDE_PRODUCT, TOTAL_UPSIDE_SERVICE FROM ESALESFCST.OMF_FORECAST_DATA_FDEV@XXG2C_ECRMS_FDEV_ADMIN.COMPANY.COM; UPDATE xxops_forecast_extract b SET territory_id = (SELECT a.territory_id FROM fdev_hier_node_mv a WHERE a.shr_node_id = b.shr_node_id AND NVL(end_dt,SYSDATE) > SYSDATE) ; COMMIT; UPDATE xxops_forecast_extract b SET position_id = (SELECT a.row_id FROM s_postn a WHERE a.name = 'TD-'||UPPER(b.am_id)) WHERE position_level = 7 AND b.am_id IS NOT NULL; COMMIT; UPDATE xxops_forecast_extract b SET position_id = (SELECT a.row_id FROM s_postn a WHERE UPPER(a.desc_text) = UPPER(TRIM(B.POSITION_NAME))) WHERE position_level = 7 AND b.am_id IS NULL; COMMIT;
You can try with the merger?
-
need help with the Merge statement
I'm on: Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
I'm currently an UPDATE statement and then it works and is accurate, it takes 30 minutes. I heard that MERGE
can do the same thing and is just as accurate and much faster!
Here's the query I want to convert into a MERGE INTO statement. I tried to do it myself, but I get errors and don't know simply, since it's new for me.
Basically I want to update table your on a corresponding condition in the table tt for 2 columns (GTP and UPDATE_DT), for UPDATE_DT I want to insert the Date current system.
Thank you!UPDATE /*+ PARALLEL (16) */ OLDER_Table ta SET (ta.GTP, ta.UPDATE_DT) = (SELECT /*+ PARALLEL (16) */ tt.GTP, SYSDATE FROM NEWER_Table tt WHERE ta.cust_id = tt.cust_id AND ta.STAMP_DATE = tt.STAMP_DATE AND ROWNUM = 1) WHERE EXISTS (SELECT 1 FROM NEWER_Table tt WHERE ta.cust_id = tt.cust_id AND ta.STAMP_DATE = tt.STAMP_DATE AND (NVL(ta.GTP, 'X') != NVL(tt.GTP, 'X')));
Hello
Whenever you have a problem, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) of all of the tables involved.
Also post the results you want from this data, as well as an explanation of how you get these results from these data, with specific examples.
If you ask on a DML statement, such as UPDATE, CREATE TABLE and INSERT statements need to re - create the tables as they are before the DML, and results will be the content of the or the tables changed when it's all over.
See the FAQ forum {message identifier: = 9360002}MERGE peut be much faster than update; Sometimes, there is no significant difference in speed.
Tables in multiple situations like this, I've never seen a case where the MERGER has been slower than the UPDATE, even if the UPDATE is sometimes easier to code and just as fast.Maybe that's what you want:
MERGE INTO older_table dst USING ( SELECT n.cust_id , n.stamp_date , n.gtp , ROW_NUMBER () OVER ( PARTITION BY n.cust_id , n.stamp_date ORDER BY n.gtp ) AS r_num FROM newer_table n JOIN older_table o ON n.cust_id = o.cust_id AND n.stamp_date = o.stamp_date AND NVL ( n.gtp , 'X' ) != NVL ( o.gtp , 'X' ) ) src ON ( src.cust_id = dst.cust_id AND src.stamp_date = dst.stamp_date AND src.r_num = 1 ) WHEN MATCHED THEN UPDATE SET dst.gtp = src.gtp , dst.update_date = SYSDATE ;
As I can't test it, I can't be sure.
-
Defined column ambiguous error with the Merge statement
Hi guys,.
I get the ' Error (136,4): PL/SQL: ORA-00918: column ambiguously defined "error with the following query of fusion,
I tried to solve the problem in a lot of ways, but no use. Please help me solve this problem. If you want more details, I'll give you.MERGE INTO Inv_Stk_Trns_Tail a USING (SELECT b.*, c.* FROM OLR b ,Inv_Stk_Trns_Tail c WHERE b.Trn_Type <> '0' AND b.VoucherType IS NOT NULL AND b.VoucherType = 'SF' AND b.Item_Code = c.Item_Code AND c.PROPERTY = 0) src ON (a.Sl_No = src.Sl_No and a.Ref_No = src.Ref_No ) WHEN MATCHED THEN UPDATE SET Item_Avg_Ppr = src.Opn_Avg_Cost, Rate_Bc = src.Opn_Avg_Cost;
Thank you
RAMSELECT B.*, c.
Try all the (necessary) columns on the code and the name of each column a unique alias.
-
Problem in the Merge statement
Hi all
I use the merge updated statement 30000 records of tables having 55 records of Lakes.
But it takes a lot of time as I kill the session after 12 hours, as it was still ongoing.
So, the same day I m using cursors, it will end in less than 3 hours.
I used merge is: -.
MERGE IN Table1 a
USING (SELECT MAX (TO_DATE (TO_CHAR (contact_date, "dd/mm/yyyy")
|| contact_time,
"jj/mm/aaaa HH24:Mi:SS".
)
) m_condate,.
appl_id
FROM Table2 b,.
(SELECT DISTINCT acc_no acc_no
IN table 3, Table1
WHERE acc_no = appl_id AND delinquent_flag = 'Y '.
AND financier_id = 'NEWACLOS') d
WHERE d.acc_no = b.appl_id
AND (contacted_by IS NOT NULL
OR followup_branch_code IS NOT NULL
)
GROUP BY appl_id) c
WE (a.appl_id = c.appl_id AND a.delinquent_flag = 'Y')
WHEN MATCHED THEN
UPDATE
SET last_contact_date = c.m_condate;
In this query, table 1 has 30000 documents and table 2 and table 3 have records 3670955 and 555674 respectively.
Please suggest, what I'm doing wrong with merger, because according to my understanding merge statement is much better than the updates or updates using cursors.
Required info is as follows:
SQL > show the user_dump_dest parameter
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
user_dump_dest string/opt/oracle/admin/FINCLUAT/udu
MP
SQL > show parameter optimizer
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 10.2.0.4
optimizer_index_caching integer 0
OPTIMIZER_INDEX_COST_ADJ integer 100
the string ALL_ROWS optimizer_mode
optimizer_secure_view_merging Boolean TRUE
SQL > show parameter db_file_multi
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
db_file_multiblock_read_count integer 16
SQL > show parameter db_block_size
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
Whole DB_BLOCK_SIZE 8192
SQL > column sname format a20
SQL > column pname format a20
SQL > column pval2 format a20
SQL > select
2 sname,
3 pname,
pval1 4,.
5 pval2
6 of
7 sys.aux_stats$;
sys.aux_stats$
*
ERROR on line 7:
ORA-00942: table or view does not exist
Elapsed time: 00:00:00.05
SQL > explain the plan for
2 - Put your statement here
3 MERGE IN one cs_case_info
4 USE (SELECT MAX (TO_DATE (TO_CHAR (contact_date, "dd/mm/yyyy")
5 || contact_time,
6 'dd/mm/yyyy HH24:Mi:SS.
7 )
(8) m_condate,
9 appl_id
CS_CASE_DETAILS_ACLOS 10 b,
11 (SELECT DISTINCT acc_no acc_no
12 OF NEWACLOS_RESEARCH_HIST_AYLA, cs_case_info
13 WHERE acc_no = appl_id AND delinquent_flag = 'Y '.
14 AND financier_id = "NEWACLOS") d
15 WHERE d.acc_no = b.appl_id
16 AND (contacted_by IS NOT NULL
17 GOLD followup_branch_code IS NOT NULL
18 )
C 19 GROUP BY appl_id)
20. WE (a.appl_id = c.appl_id AND a.delinquent_flag = 'Y')
21. WHEN MATCHED THEN
UPDATE 22
23 SET last_contact_date = c.m_condate
24;
He explained.
Elapsed time: 00:00:00.08
SQL > select * from table (dbms_xplan.display);
PLAN_TABLE_OUTPUT
----------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | TempSpc | Cost (% CPU).
--------------------------------------------------------------------------------------------------
| 2 > MERGE STATEMENT | 47156 | 874K | 128K (1) |
| 1. MERGE | CS_CASE_INFO |
| 2. VIEW |
| 3. HASH JOIN | 47156 | 36 M | 5672K | 128K (1) |
| 4. VIEW | 47156 | 5111K | 82339 (1) |
| 5. GROUP SORT BY | 47156 | 4236K | 298 M | 82339 (1) |
| 6. HASH JOIN | 2820K | 247 M | 10 M | 60621 (1) |
| 7. HASH JOIN | 216K | 7830K | 6985 (1) |
| 8. VIEW | the index $ _join$ _012 | 11033. 258K | 1583 (1) |
| 9. HASH JOIN |
| 10. INDEX RANGE SCAN | IDX_CCI_DEL | 11033. 258K | 768 (1) |
| 11. INDEX RANGE SCAN | CS_CASE_INFO_UK | 11033. 258K | 821 (1) |
| 12. FULL RESTRICTED INDEX SCAN FAST | IDX_NACL_RSH_ACC_NO | 5539K | 68 M | 5382 (1) |
| 13. TABLE ACCESS FULL | CS_CASE_DETAILS_ACLOS | 3670K | 192 M | 41477 (1) |
| 14. TABLE ACCESS FULL | CS_CASE_INFO | 304K | 205 M | 35975 (1) |
--------------------------------------------------------------------------------------------------
Note
-----
-"PLAN_TABLE' is old version
24 selected lines.
Elapsed time: 00:00:01.04
SQL > rollback;
Complete restoration.
Elapsed time: 00:00:00.03
SQL > set autotrace traceonly arraysize 100
SQL > alter session set events 10046 name context forever, trace level 8';
ERROR:
ORA-01031: insufficient privileges
Elapsed time: 00:00:00.04
SQL > disconnect
Disconnected from the database to Oracle 10 g Enterprise Edition Release 10.2.0.4.0 - Production 64-bit
With partitioning, OLAP, Data Mining and Real Application Testing options
SQL > spool off
Published by: user4528984 on May 5, 2009 22:37Create indexes for tables. CS_CASE_DETAILS_ACLOS, CS_CASE_INFO
also try to use the underside of suspicion
(SELECT / * + no_merge * / SEPARATE acc_no acc_no)
IN table 3, Table1HTH
-
Problems with the switch statement
There everyone,
I tried to build a page with 4 buttons. Each button is a symbol that contains 2 png´2 who are the drawings of the key. If you click on the button 1, he has to move on the screen. If you click it again it should back off. and if you click on another button button1 is active then button1 should return to the starting position and button 2 should come on the screen.
I use a switch statement and a variable.
composition ready, I used
sym.setVariable("current","");
to set the Variable
each button (one of the png within the symbols), I used:
var = sym.getComposition.getStage.getVariable ("current") courses;
switch (current)
{
case ' ':
SYM. Play ("in");
break;
case button1:
SYM. Play ("out");
break;
by default:
sym.getComposition.getStage.getSymbol (current) ("out") .play;
SYM. Play ("in");
break;
}
announcement each animation buttons are labels for the entrance and animation. There are also triggers that change the current variable on the stage
sym.getComposition.getStage.setVariable ("current", "button1");
If I test inside a browser and click the button nothing happens.
I m what do not know my mistake.
can someone help me?
concerning
Mr.Monsen
Hello
Some errors of syntax in red:
class var = sym.getComposition () .getStage () .getVariable ("current");
switch (current)
{
case ' ':
SYM. Play ("in");
break;
case "button1":
SYM. Play ("out");
break;
by default:
sym.getComposition () .getStage () .getSymbol (current) ("out") .play;
SYM. Play ("in");
}
sym.getComposition () .getStage () .setVariable ("current", "button1");
-
Problem with the update statement
Hello
Can someone tell me please the difference between
H1. Select s.name, s.id, d.id, d.name in s, d where s.id = d.id;
and
H1. Select s.name, s.id, d.id, d.name in s d on s.id = d.id inner join;
They give me the same result, but I would like to know how it works internally.
And also
update source X set name =)
H3. Select Y.name in the destination Y where X.id = Y.id
)
where X.id in (select destination id);
Is doing an update
but when
update source set name =)
H3. Select Y.name in the destination source Y X on X.id = Y.id inner join
)
where X.id in (select destination id);
using the above query, I get an error message stating "only query returns multiple lines.
What is the error that I commit here?
Thanks in advance
SanaAssuming that table destination has PK/UK on id:
SQL> create table source(id number,name varchar2(10)); Table created. SQL> insert into source(id) select empno from emp 2 / 14 rows created. SQL> create table destination(id number,name varchar2(10)); Table created. SQL> insert into destination select empno,ename from emp 2 / 14 rows created. SQL> commit 2 / Commit complete. SQL> update (select s.id,s.name s_name,d.name d_name from source s inner join destination d on s.id = d.id) 2 set s_name = d_name 3 / set s_name = d_name * ERROR at line 2: ORA-01779: cannot modify a column which maps to a non key-preserved table SQL> alter table destination 2 add constraint destination_pk 3 primary key(id) 4 / Table altered. SQL> update (select s.id,s.name s_name,d.name d_name from source s inner join destination d on s.id = d.id) 2 set s_name = d_name 3 / 14 rows updated. SQL> select * from source 2 / ID NAME ---------- ---------- 7369 SMITH 7499 ALLEN 7521 WARD 7566 JONES 7654 MARTIN 7698 BLAKE 7782 CLARK 7788 SCOTT 7839 KING 7844 TURNER 7876 ADAMS ID NAME ---------- ---------- 7900 JAMES 7902 FORD 7934 MILLER 14 rows selected. SQL>
SY.
-
Error in the Merge statement using dblink
Hello
I am facing the following error when you use the merge statement using the dblink.
ORA-02069: global_names must be set to true for this operation parameter.
I can use the same dblink in my select insert and update statements but when I try to use merge then he invites the error said, is also not any syntax error as same statement can be used on the same tables of database instead of dblink.
Please suggest any help will be much appreciated.
Thanks in advance
Hi Aqeel
If insert and update statements work well through links db, then it should not be a problem with the merge statement. But if you are faced with the question, so please check the entire sql statement with tnsnames on both sides. Please share the tnsnames for the two dbs with dblink ddl.
Concerning
Jihane Narain Sylca
-
Problems with the buttons (on the area of State/Hit)
The site I'm getting is:
If you go to the "Biography" section, you'll see four links that work as buttons of reversal. Now, if you go to the 'Media' section, you will see 6 links that do not appear to react correctly as buttons of reversal. They fulfill their function, but it is difficult to get the button to appear in its "underline" in the State. I don't know if it is a problem with the over State, the status of success or another problem with how I built the site. If you want to take a look at this, go to:
http://www.uvm.edu/~nmphilli/Relic_Website/Flash/Relic_Webpage.fla
to get the FLA for the site. The concerned items are nested as follows: in scene 1, on the content layer, label image 'Media' (frames, 16-21), you will find Media_Fader, where is Media_Content, in which are several buttons, each with getURL actions that are applied to them. Any help would be fantastic! Thank you!
-Nic
The question always involves using the textfield links. Remove the textfields in all settings inside the buttons and your problems should go away.
-
Different result by using the MERGE statement
I have 2 SQL statements:
MERGE INTO PT_CQS_AGGR APC
With the HELP of PT_CQS_AGGR_TEMP Lady
WE (concat (concat(pca.from_city_id,pca.to_city_id), pca.query_timestamp_hh) = concat (concat(pcah.from_city_id,pcah.to_city_id), pcah.query_timestamp_hh))
WHEN MATCHED THEN
Setting a DAY SET pca.search_count = pca.search_count + pcah.search_count
WHEN NOT MATCHED THEN
VALUES of INSERTION (to_city_id, query_timestamp_hh, from_city_id, search_count) (pcah.from_city_id, pcah.to_city_id, pcah.query_timestamp_hh, pcah.search_count);
AND
MERGE INTO PT_CQS_AGGR APC
With the HELP of PT_CQS_AGGR_TEMP Lady
WE (pca.from_city_id = pcah.from_city_id AND pca.to_city_id = pcah.to_city_id AND pca.query_timestamp_hh = pcah.query_timestamp_hh)
WHEN MATCHED THEN
Setting a DAY SET pca.search_count = pca.search_count + pcah.search_count
WHEN NOT MATCHED THEN
VALUES of INSERTION (to_city_id, query_timestamp_hh, from_city_id, search_count) (pcah.from_city_id, pcah.to_city_id, pcah.query_timestamp_hh, pcah.search_count);
First statement correctly the merged data, but use FULL TABLE SCANS, so it's rather slow. Second statement using a UNIQUE INDEX on the columns from_city_id, to_city_id, and query_timestamp_hh on the MAP of EXPLAIN, but during the execution of I've got ORA-00001: unique constraint (PODOWNER. IDX_CQS_AGGR_3COL) violated. What is the problem with the second statement - especially with this line:
WE (pca.from_city_id = pcah.from_city_id AND pca.to_city_id = pcah.to_city_id AND pca.query_timestamp_hh = pcah.query_timestamp_hh) Can I use a more complex condition in the MERGE statement? Because it seems that not all the conditions have been taken...
???
Select pcah.from_city_id, pcah.to_city_id, PT_CQS_AGGR_TEMP Lady pcah.query_timestamp_hh
less
Select pca.from_city_id, pca.to_city_id, pca.query_timestamp_hh PT_CQS_AGGR pca
somewhere the conditions limiting the time.
(or whatever the columns make up the stress of failing)
In addition, select for each column in the constraint of failure where the column is null. If one of these columns is null, equality fails, even if both are null, because null <> null. So you will get a "no match" if all values are the same and it is set to null.
Edit: Oh, slap forehead, that is why one works and the complete analysis. As SomeoneElse said, it normalizes the type of data and concatenates, comparison null to no effect and refusing all usual index.
-
OfficeJet 6600 - reports HP Connect "problem with the printer.
I just bought an all-in-one OfficeJet 6600 and immediately installed on my MacBook Pro. Installation went smoothly, and I used it for scanning and printing. I am very happy. However, I noticed that HP Connect reports "Issue with printer." Well, it worked fine, so I ignored the error and continued to work.
Tonight, I have installed the printer on a Windows 7 laptop. At HP Connect, it is always now reports "Problem with printer." That's it - no further details and no symptoms of any kind of problem. How to diagnose the 'problem' and how to fix it?
Hi there, I know this may seem illogical, but I wouldn't worry too much about the problem with the printer State message in connected HP. I saw myself sometimes, and I was able to print successfully from a mobile device to the printer which connected HP indicated that there is a problem. Have you tried to send a job by using either the application mobile ePrint or to the e-mail address of printers for the printer in question?
On the Windows 7 machine, you can also download and run the HP print and Scan Doctor to confirm there is no problem with the connection to the computer on which is installed the software of the printer or the printer hardware. Be aware, however, that the application is compatible with the Windows operating system only, so you cannot run it on the Mac computer, but unless you are having problems printing from Mac to the printer, there is no reason to suspect that anything is wrong.
Hope that makes sense, but post comes back with other questions.
Best.
-
Return in the MERGE statement clause
Hello
I use Oracle 10 g Version
I tried the code using UPDATE with return Clause & MERGER with return below Clause.
I have not found ANY error while working with the UPDATE statement. Here is the code with the UPDATE statement
DECLARE TYPE empno_list IS TABLE OF emp.empno%TYPE; vempno_list empno_list; BEGIN UPDATE emp SET comm = 11 WHERE deptno IN (SELECT deptno FROM dept) RETURNING empno BULK COLLECT INTO vempno_list; FOR i IN vempno_list.FIRST .. vempno_list.LAST LOOP DBMS_OUTPUT.put_line ('Values of EMP ' || vempno_list (i)); END LOOP; END;
But PL/SQL error: ORA-00933: SQL not correctly completed command when you work with the MERGE statement
declare type empno_list is table of emp.empno%type; vempno_list empno_list; begin merge into emp tgt using dept src on (src.deptno =tgt.deptno) when matched then update set tgt.comm=12 returning tgt.empno bulk collect into vempno_list ; for i in vempno_list.first .. vempno_list.last loop dbms_output.put_line('Values of EMP '||vempno_list(i) ) ; end loop; end;
Please suggest me
Probably because BACK IN clause does not belong to the MERGE statement. It is available only for INSERT, UPDATE, and DELETE. Here's the quote from Oracle Documentation:
The static method
RETURNING
INTO
article belongs to aDELETE
,INSERT
, orUPDATE
statement. The dynamicRETURNING
INTO
article belongs to aEXECUTE
IMMEDIATE
statement.And here is the link.
It will be useful.
Ishan
-
Problem with the change of a 'State' the substitution of one break of the chronology of the objects
Here is my setup: I have a single slide for learning select 9 melodies 'text buttons' to view 9 different definitions. To do this, I set myself to each buttons to change the "State" of the original image for the introduction of a 'legend of text' containing the definition of that label of buttons. I also three navigation buttons (output, back and next; button_19 _20 & _21) with breaks built into the end of the timeline. coinciding with the end of the audio narration for this slide.
Here's my problem: the calendar runs and stops as it should until the learner chooses one of the 'text' buttons after that the timeline is suspended; how it seems to send a command to "continue" and substitutes at the break, and brings the learner to the next slide.
This has something to do with the function "States"? I used to do exactly the same thing in Cap 7 with stocks advanced without any problem.
Thanks in advance for the help.
v/r
Jay
If it's 9 Captivate, locate the box continue a project of play in the Actions section and deselect buttons for each.
-
How do I monitor/find where is the State of my download? I don't know how long it takes or if there is a problem with the download that I can't find anything. Also, is it supposed to be an icon for my purchase of Photoshop and light in my apps folder? Where can I find that when it's done download?
Could you please confirm the operating system you are using.
You can see the status of the application of CC desktop download.
The CC app desktop click the creative cloud icon located in the taskbar (Windows) or the Apple bar (Mac OS) menu, to open the creative cloud desktop application.
Hope this will help you.
Kind regards
Hervé Khare
-
What is the problem with this WHERE statement?
What is the problem with this WHERE statement?
< cfquery datasource = "manna_premier" name = "kit_report" >
SELECT SaleDate,
TerritoryManager,
Distributor,
DealerID,
Variable,
US_Dealers.ID,
DealerName,
DealerAddress,
DealerCity,
DealerState,
DealerZIPCode
Orders, US_Dealers
WHERE US_Dealers.ID EQ DealerID AND SaleDate BETWEEN #CreateODBCDate (FORM. Implementation) # AND #CreateODBCDate (FORM. End) #.
ORDER BY SaleDate
< / cfquery >It's driving me crazy!
Syntax error (missing operator) in query expression ' US_Dealers.ID EQ DealerID
You accidentally use the CF equals operator: "EQ".
Instead of MS Access: «=»
[Macromedia] [SequeLink JDBC Driver] [ODBC Socket] [Microsoft] [ODBC Microsoft Access driver]...
in a query expression. AND SaleDate BETWEEN #10/1/2009 #-October 18, 2009 #'.
I don't see how CreateODBCDate() would produce these values. But maybe it's just a quirk of the error message?
Maybe you are looking for
-
Question about the use of Apple Remote Desktop on the Internet
Hi all I used ARD for a few months with the local network. Recently, my parents (living in a different city) decided to get an iMac. And they would sometimes help me with the software and everything. So I set up a VPN connection between their house a
-
C# takes arguments & reporting during execution of the text file
I have a text file with the following text: int A = 5;Dim str As String = "tempstring;15, 16, 20, 22 DosomeMethod str. When you read the text through my program file, I want to declare int A = 5 & Dim Str as string = "tempstring" during execution. It
-
XP installation media is missing
I lost my original installation media of Windows XP and now the hard drive crashed (and I've lost all info on it), I can no longer re - install them. I have the original Microsoft Windows XP Proffesional sticker and the number. Can I use this to get
-
Effects of camera of Smartphones blackBerry Bold 9900
Hello Will there be an option in the settings of the Bold 9900 camera to take pictures in black and white? I see that the 'scenes' but nothing comparable to the effects. Thank you.
-
When you download or upload an image, I get the error message jbnsres.dll is missing
In Windows 7 Home premium, during the download or upload an image, I get the JBNSRES error message. Missing DLL. I appreciate any suggestion to correct the error. Giacov