Problem in the sqlite statement
public static final String DATABASE_TABLE_SIZE = "SizesLookup"; public static final String KEY_SIZE_ID = "SizeId"; public static final String KEY_SIZE_Name = "SizeName"; Statement st = null; try { st = db.createStatement("INSERT INTO" + DATABASE_TABLE_SIZE + "(" + KEY_SIZE_ID + "," + KEY_SIZE_Name + ") VALUES (?,?)"); st.prepare(); st.bind(1, id); st.bind(2, name); st.execute(); st.reset(); return true; } catch (Exception e) { return false; } finally { try { st.close(); } catch (Exception e) { return false; } }
the code enter an exception in the insert statement, I want to do var in the name of the table and the columns why this error please help me
I know that the solution
Insert the statement will be
St = db.createStatement ("INSERT INTO [" + DATABASE_TABLE_SIZE + ""]([») ")
+ KEY_SIZE_ID + "], [" + KEY_SIZE_Name + "]) VALUES (?,?) ');
Tags: BlackBerry Developers
Similar Questions
-
Hi all
I need to replace the value selected,
Here's the query... make a mistake... make me ORA-00923: KEYWORD not found or provided.
Could you please correct me.
SELECT sper.assettxt =
CASE
WHEN (select description of flv fnd_lookup_values where flv.lookup_type = 'ZZCUS_SPER_ASSET_CODES'
and flv.description = sper.assettxt);
(select the meaning of flv fnd_lookup_values where flv.lookup_type = 'ZZCUS_SPER_ASSET_CODES'
and flv.description = sper.assettxt)
NVL (resp_cat. (Text, 'Total');
NVL (SUM (DECODE (sper.author_create_ta_interval,' < = 24 h, sper.total, 0)), 0) day1.
NVL (SUM (DECODE (sper.author_create_ta_interval,' < = 48 but > 24', sper.total, 0)), 0) day2.
NVL (SUM (DECODE (sper.author_create_ta_interval,' < = 72 but > 48', sper.total, 0)), 0) day 3,.
NVL (SUM (DECODE (sper.author_create_ta_interval,' > 72 h, sper.total, 0)), 0) day4.
NVL (SUM (DECODE (sper.author_create_ta_interval, "N/a", sper.total, 0)), 0) 'open ',.
NVL (SUM (sper.total), 0) "Grand Total".
(SELECT "point proven" TEXT data)
OF THE DOUBLE
UNION
SELECT "data updated item.
OF THE DOUBLE
UNION
SELECT "other answers.
Resp_cat FROM DUAL)
LEFT OUTER JOIN
(SELECT assettxt,
s.sper_status_text,
s.author_create_ta_interval,
Total COUNT (*)
OF s zzcus.zzcus_sper_data
WHERE 1 = 1
AND s.sper_dates =: P_SR_DATES
AND s.sper_month = substr(:P_SR_DATES,5,2)
AND s.customer_id =: P_CUSTOMER_ID
- AND s.task_inquiry_type AS ' descriptive data Challenge %.
AND s.assettxt <>'! MAD
S.assettxt, s.sper_status_text, s.author_create_ta_interval)
SPER partition by (SPER. ASSETTXT)
((CASE
WHEN sper.sper_status_text = "data confirmed."
THEN
"Question confirmed the data.
WHEN sper.sper_status_text = "updating data"
THEN
"Item updated data.
ON THE OTHER
"Other answers.
END) = resp_cat.text)
GROUP BY ROLLUP (resp_cat.text), sper.assettxt
ORDER BY sper.assettxt, (CASE resp_cat.text
WHEN 'confirmed data element' THEN 1
WHEN 'updated data element' THEN 2
WHEN "Others" THEN 3
END)
I need to replace sper.assettxt with the meaning of fnd_lookup_values table.
-Well, it is interpretation since I'm guessing by your intention with the CASE statement.
Do you mean
CASE WHEN EXISTS ( SELECT description FROM fnd_lookup_values flv WHERE flv.lookup_type ='ZZCUS_SPER_ASSET_CODES' AND flv.description =sper.assettxt ) THEN ( SELECT meaning FROM fnd_lookup_values flv WHERE flv.lookup_type ='ZZCUS_SPER_ASSET_CODES' AND flv.description =sper.assettxt ) END,
If yes then it is much better represented as
( SELECT meaning FROM fnd_lookup_values flv WHERE flv.lookup_type ='ZZCUS_SPER_ASSET_CODES' AND flv.description =sper.assettxt )
Assuming that the code returns 0 - 1 line (no more and you will get an error).
-
What is the problem in this sqlite statement
st1 = db.createStatement("select[" + KEY_ITEM_ID+ "]From [" + DATABASE_TABLE_FavItems + "] Where ["+ KEY_FAVORITE_ID + "] <> " + fId + "AND ["+ KEY_ITEM_ID + "]" + "=" + fId);
Please someone help me
It seems that you include a space before the 'AND ':
fId + "AND..."
-
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 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
-
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.
-
Problem in the select statement on the xmltype table
Hello
I have a table xmltype with a type of object/atrribute to the CLOB data type. When I now do a query, I get the error ORA-22835 - what goes wrong? The data type of the attribute of the source and the declared variable is CLOB.
Thanks in advance.DECLARE vFoto CLOB; BEGIN SELECT SUBSTR(pe.foto_pass, 1, 100) INTO vFoto FROM fp_epass_pass_antraege pa , XMLTABLE('/PassAntrag' PASSING pa.sys_nc_rowinfo$ COLUMNS antrag XMLTYPE PATH '/PassAntrag/Antrag' , person XMLTYPE PATH '/PassAntrag/Person') paan , XMLTABLE('/' PASSING paan.antrag COLUMNS uuid VARCHAR2(38) PATH 'UUID') an , XMLTABLE('/' PASSING paan.person COLUMNS foto_pass CLOB PATH 'FotoPass') pe WHERE an.uuid = '84239536904120131828493266953553299522'; END;
Kind regards
MartinMartin1 wrote:
But now I have to decode the base64binary data.The BLOB that results already contains the decoded base64 data.
Now, given your sample, it seems the decoded content (or at least a part of it) contains data base64 again. Is this right?
-
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.
-
problem of the SELECT statement. How to get data in one line
SELECT
Razm.datum_sklenitve,
Razm.datum_prenehanja,
Of
zket_zaposlenci zap,
zket_delovna_razmerja razm
zket_delovne_razporeditve razp,
zket_sistemizacije_dm sistdm,
OE zket_organizacijske_enote,
zket_delovna_mesta delm
WHERE
zap.iid_zaposlenca = razm.iid_zaposlenca and
Razm.iid_delovno_razmerje = razp.iid_delovno_razmerje and
sistdm.iid_sistemizacija_dm (+) = razp.iid_sistemizacija_dm and
NVL (sistdm.iid_organizacijske_enote, razp.iid_organizacijske_enote) = oe.iid_organizacijske_enote and
sistdm.iid_delovno_mesto = delm.iid_delovno_mesto and
Razm.datum_sklenitve < = to_date ("' 31,12' |: v_datum, ' dd.mm.yyyy") and
NVL (razm.datum_prenehanja, to_date ("' 31,12' |: v_datum, ' dd.mm.yyyy")) > = to_date ("' 1.01 ' |: v_datum, ' dd.mm.yyyy") and
razp.datum_nastopa_dela < = to_date ("' 31,12' |: v_datum, ' dd.mm.yyyy") and
NVL (razp.datum_prenehanja_dela, to_date ("' 31,12' |: v_datum, ' dd.mm.yyyy")) > = to_date ("' 1.01 ' |: v_datum, ' dd.mm.yyyy") and
zkep_splosno.zkep_hierarh_oe_n (nvl (sistdm.iid_organizacijske_enote, razp.iid_organizacijske_enote): v_oe, to_date (' 31,12' |: v_datum, 'dd.mm.yyyy')) = 1 and
TO_CHAR (zkep_splosno.zkep_vrni_prvi_dr (razm.iid_delovno_razmerje, to_date ("' 31,12' |: v_datum, ' dd.mm.yyyy")), 'yyyy') =: v_datum
and zap.iid_zaposlenca = 1093507
razm.datum_sklenitve DESC order
;
return train:
datum_sklenitve datum_prenehanja
1: 01.10.2010 00:00:00 | 31.12.2010 00:00:00
2: 01.10.2010 00:00:00 | 31.12.2010 00:00:00
3: 01.04.2010 00:00:00 | 31.08.2010 00:00:00
4: 01.02.2010 00:00:00 | 31.02.2010 00:00:00
How can I get in a select just this result.
1: 01.10.2010 00:00:00 | 31.08.2010 00:00:00 (A first, then the following b which is not the same as the top of B)
I try but I don't know how. If anyone knows how to do this.
Kind regards
MBSimma says:
But the above is not documented.Not only that, but it's chain aggregation which is not the OP requirements.
Although you could easily forgiven as the OP has not clearly stated the logic underlying the requirements.
It could be something like original packaging SQL with something like the following...
SQL> ed Wrote file afiedt.buf 1 with t as (select date '2010-10-01' as ds, date '2010-12-31' as dp from dual union all 2 select date '2010-10-01', date '2010-12-31' from dual union all 3 select date '2010-04-01', date '2010-08-31' from dual union all 4 select date '2010-02-01', date '2010-02-28' from dual) 5 -- 6 -- END OF TEST DATA 7 -- 8 select max(case when rn = 1 then ds else null end) as ds 9 ,max(case when rn = 2 then dp else null end) as dp 10 from ( 11 select ds, dp, row_number() over (order by ds desc nulls last) rn 12 from ( 13 select case when lag(ds) over (order by ds desc) = ds and lag(dp) over (order by ds desc) = dp then null else ds end as ds 14 ,case when lag(ds) over (order by ds desc) = ds and lag(dp) over (order by ds desc) = dp then null else dp end as dp 15 from t 16 order by t.ds 17 ) 18* ) SQL> / DS DP ------------------- ------------------- 01/10/2010 00:00:00 31/08/2010 00:00:00 SQL>
but who knows?
-
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?
-
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.
-
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.
-
the pipe state is invalid C:\windows\system32\rstrui.exe
How to solve the problem of "the pipe state is invalid. Or I can install any antivirus program , or Open the system restore. All the time this message appears, and the computer crashes.
Hi TechoChaser
A "named pipe" is a way for applications to share information between them, kind of like a network connection between the content of the memory of two applications. Anti Virus software usually tries to inspect interaction through named pipes to assess if there is something untoward in progress, but it is also possible for Anti Virus to interfere with the mechanism to the point where there is a failure.
Try to run the System File Checker tool and check.
See this link for more details:
After back and let us know if it helped to solve your problem.
Thank you and best regards,
R uma - Microsoft technical support.
Visit our Microsoft answers feedback Forum and let us know what you think.
-
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.
-
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
Maybe you are looking for
-
I need the disk recovery for the Qosmio E10
Hello.. I wonder if someone can make me a copy of the diskette of recovery for the qosmio e10, and what I will use to get the best tv signal? see you soon
-
Hi whenever I connect to the net on my DC7700 I geta virus WARNING asking me to call a support number but ive done a virus scan and found nothing, any ideas would be great thank you
-
The screen on my Satellite P30 is completely broken
I have the laptop above and a week ago the laptop fell, my partner was out with the machine in time and I don't know it fell on concreate must have rolled. Now, the screen is completely broken. What I see is a white blob, it publishes, but then I get
-
Synchronize the clocks on M-series via DDK
Hello We are in a new cycle of development and require the clocks on our maps of the series M (6259, 6225) to synchronize. I searched the docs of NOR and the Forums for more information, but am coming short on details to implement synchronization. Fi
-
Vista update KB968930 will not, download the 80007000D error code
Always get the 80007000D error code