Storing Chinese data as clob using dbms_xmlquery
Hi,
I am writing a procedure that creates a query and same is stored as CLOB in a database table. Below is a sample test program for same. I am using UTF-8 to accomodate Chinese data. The CLOB however doesn't contain valid chinese data. Please guide me on what needs to be done....
declare
l_ctx dbms_xmlquery.ctxtype;
l_xml_schema NCLOB;
begin
l_ctx := dbms_xmlquery.newcontext('SELECT * FROM (SELECT "SEC","coretypeid","coreid","Record Type","您ID" FROM (SELECT "您MultiCurrency Object".coreid "SEC","您MultiCurrency Object".coretypeid "coretypeid", "您MultiCurrency Object".coreid "coreid", "您MultiCurrency Object".CoreTypeAssocAliasDescr "Record Type", "您MultiCurrency Object".F_3441961635 "您ID"
FROM ( SELECT SUBSTR(RFN_FlexSQL_Cache.GetCTAliasDescr(CORETYPEID,3441940070,3443315783),0,50) CoreTypeAliasDescr,
SUBSTR(RFN_FlexSQL_Cache.GetCTAssocAliasDescr(CORETYPEID,3441940070,3443315783),0,50) CoreTypeAssocAliasDescr,
SUBSTR(RFN_FlexSQL_Cache.GetCTDescr(CORETYPEID,3441940070,3443315783),0,50) COREDESCRIPTION,
COREID, CORETYPEID ,F_3441961635 FROM CT_3420185025
WHERE coretypeid IN (3420185025)) "您MultiCurrency Object" )) WHERE 1 = 2');
dbms_xmlquery.setraiseexception(l_ctx, TRUE);
dbms_xmlquery.setsqltoxmlnameescaping(l_ctx, TRUE);
-- dbms_xmlquery.setdateformat(l_ctx, l_xml_sformat);
dbms_xmlquery.setencodingtag(l_ctx, 'ISO-8859-1');
l_xml_schema := dbms_xmlquery.getxml(l_ctx,2);
insert into testingXMLgen values (l_xml_schema);
-- :xml_data := dbms_xmlquery.getxml(l_ctx);
dbms_xmlquery.closecontext(l_ctx);
end;
I have tried UTF-8 encoding set as well. It didn't work toodbms_xmlquery.setencodingtag(l_ctx, 'UTF-8');
Corresponding database column is NCLOB
select * from nls_database_parameters;PARAMETER VALUE
NLS_LANGUAGE AMERICAN
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET WE8ISO8859P1
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
PARAMETER VALUE
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_RDBMS_VERSION 10.2.0.5.0
20 rows selected.
Similar Messages
-
Storing VARCHAR2 data into CLOB in Oracle 8i
I have a variable in PL/SQL of data type CLOB. And there is another variable of type VARCHAR2. How can i assign the value in the VARCHAR2 data type to CLOB data type.
The version iam trying to do this is
Oracle8i Enterprise Edition Release 8.1.7.2.1
Thanks,
Karthick.This system has been build already. And this one is for some testing purpose. Any way i have given a temporary solution for them with a temp table.
SQL> create table t (col clob)
2 /
Table created.
SQL> declare
2 lClob Clob;
3 lVar Varchar2(100) := rpad('*',100,'*');
4 begin
5 insert into t values(lVar);
6 select col into lClob from t;
7 dbms_output.put_line(dbms_lob.substr(lClob,100,1));
8 end;
9 /
PL/SQL procedure successfully completed.Thanks,
Karthick. -
Storing XML data in CLOB and relational tables
I would like to ask whether there is a possibility to store XML data using normal relational tables and CLOBs in the same time. For example I have some XML data (structured data) which I would like update very often and some which are only a kind of description. I found something about it in http://technet.oracle.com/tech/xml/infoocs/otnwp/about_oracle_xml_products.htm . But I do not know how to use Oracle8i views and some functionality of XML SQL Utility to retrieve XML data in one file.
null<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Maciej Marczukajtis ([email protected]):
I would like to ask whether there is a possibility to store XML data using normal relational tables and CLOBs in the same time. For example I have some XML data (structured data) which I would like update very often and some which are only a kind of description. I found something about it in http://technet.oracle.com/tech/xml/infoocs/otnwp/about_oracle_xml_products.htm . But I do not know how to use Oracle8i views and some functionality of XML SQL Utility to retrieve XML data in one file.<HR></BLOCKQUOTE>
Czesc Maciek,
There are some good examples with XSQL Servlet. From what I understand you have one XML file and you need to save a portion of document in relational tables and other portion in CLOB.
Yes, you can do that.
You can do it many ways. I can suggest (2).
1. Use the views
2. call your java procedure that will do
the xml processing, brake it down and insert
releval frogments into different tables/columns
null -
How to convert blob data into clob using plsql
hi all,
I have requirement to convert blob column into clob .
version details
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for 32-bit Windows: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
DECLARE
v_blob temp.blob_column%TYPE;------this is blob data type column contains (CSV file which is inserted from screens)
v_clob CLOB; --i want to copy blob column data into this clob
v_warning NUMBER;
BEGIN
SELECT blob_column
INTO v_blob
FROM temp
WHERE pk = 75000676;
DBMS_LOB.converttoclob (dest_lob => v_clob,
src_blob => v_blob,
amount => DBMS_LOB.lobmaxsize,
dest_offset => 1,
src_offset => 1,
blob_csid => 1, -- what is the use of this parameter
lang_context => 1,
warning => v_warning
DBMS_OUTPUT.put_line (v_warning);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line (SQLCODE);
DBMS_OUTPUT.put_line (SQLERRM);
END;I am not getting what is the use of blob_csid , lang_context parameters after going the trough the documentation .
Any help in this regard would be highly appreciated .......
Thanks
Edited by: prakash on Feb 5, 2012 11:41 PMPost the 4 digit Oracle version.
Did you read the Doc for DBMS_LOB.CONVERTTOCLOB? - http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_lob.htm
The function can convert data from one character set to another. If the source data uses a different character set than the target you need to provide the character set id of the source data.
The blob_csid parameter is where you would provide the value for the source character set.
If the source and target use the same character set then just pass zero. Your code is passing a one.
>
General Notes
You must specify the character set of the source data in the blob_csid parameter. You can pass a zero value for blob_csid. When you do so, the database assumes that the BLOB contains character data in the same character set as the destination CLOB.
>
Same for 'lang_context' - your code is using 1; just use 0. It is an IN OUT
>
lang_context
(IN) Language context, such as shift status, for the current conversion.
(OUT) The language context at the time when the current conversion is done.
This information is returned so you can use it for subsequent conversions without losing or misinterpreting any source data. For the very first conversion, or if do not care, use the default value of zero. -
Problem printing simplified Chinese on PM4i printer using multi-byte data
I am new to printing data in Simplified Chinese and have tried for a period of time to get it to work but it is not working. I would appreciate any help.
This is what I have:
1. Chinese data stored as multi-byte data in oracle 10g db. It is in one of the attribute fields on the mtl_system_items table. The data field it is stored in is defined as varchar2(240). I have to extract that data and print it out as simplified Chinese characters on 3x4 label stock on PM4i printer which is setup to use IPL as the default language.
2. Purchased the simplified Chinese font kit ( compact flash card ) and plugged it into the compact flash port on back of the printer. The simplified Chinese font is assigned.
3. Created simple program to build the label file to send to the printer to print the Chinese glyphs. I expected 3 to print but it only prints 1 Chinese glyph and that is not the correct.
a. Data shown in Chinese
传感器
b. Data in hex format => E4BCA0E6849FE599A8
c. Data in utf8 => ä¼ æ„Ÿå™¨
d. Simple oracle pl/sql program code to extract data from oracle and create the format file for printing
CREATE OR REPLACE PROCEDURE china_test_label1 is
hold_length number;
v_hold_armpart varchar2(240):= null;
v_hold_line varchar2(500);
v_file_name varchar2(100) := 'chlabel1.txt';
v_file_line1 varchar2(100) := '<STX><ESC>C<ETX>';
v_file_line2 varchar2(100) := '<STX><ESC>P<ETX>';
v_file_line3 varchar2(100) := '<STX>E4;F4;<ETX>';
v_file_line4 varchar2(100) := '<STX>H00;o0200,0200;c60;k32;d0,30;<ETX>';
v_file_line5 varchar2(100) := '<STX>L1;o102,102;f0;l575;w5;<ETX>';
v_file_line6 varchar2(100) := '<STX>R<ETX>';
v_file_line7 varchar2(100) := '<STX><ESC>E4<CAN><ETX>';
v_file_line8 varchar2(100) := '<STX><ETB><ETX>';
v_file_line varchar2(500);
v_file_handle UTL_FILE.file_type;
v_submit_status number;
v_out_path_name varchar2(50);
v_export_path_name varchar2(50);
-- Program Starts Here
BEGIN
fnd_file.put_line(fnd_file.log, '------- Starting Label job -------');
SELECT description
INTO v_out_path_name
FROM fnd_lookup_values
WHERE lookup_type = 'ARM_DATA_FILE_OUT_PATH'
AND lookup_code = '$FLMARM_TOP';
v_file_handle := utl_file.fopen(v_out_path_name, v_file_name, 'W');
v_file_line := v_file_line1;
utl_file.put_line(v_file_handle, v_file_line);
v_file_line := v_file_line2;
utl_file.put_line(v_file_handle, v_file_line);
v_file_line := v_file_line3;
utl_file.put_line(v_file_handle, v_file_line);
v_file_line := v_file_line4;
utl_file.put_line(v_file_handle, v_file_line);
v_file_line := v_file_line5;
utl_file.put_line(v_file_handle, v_file_line);
v_file_line := v_file_line6;
utl_file.put_line(v_file_handle, v_file_line);
v_file_line := v_file_line7;
utl_file.put_line(v_file_handle, v_file_line);
BEGIN
select attribute13
INTO v_hold_armpart
FROM apps.mtl_system_items
WHERE segment1 = '20928536'
AND organization_id = 282;
EXCEPTION
WHEN others THEN
v_hold_armpart := 'nothing';
END;
v_file_line := '<STX>'||v_hold_armpart||'<CR><ETX>';
utl_file.put_line(v_file_handle, v_file_line);
v_file_line := v_file_line8;
utl_file.put_line(v_file_handle, v_file_line);
utl_file.fclose(v_file_handle);
fnd_file.put_line(fnd_file.log, '-------------------------------------------');
fnd_file.put_line(fnd_file.log, '-- end of job ');
fnd_file.put_line(fnd_file.log, '-------------------------------------------');
END china_test_label1;
show errors;
e. i do lpr -P printer filename to print the file. here is the file contents :
<STX><ESC>C<ETX>
<STX><ESC>P<ETX>
<STX>E4;F4;<ETX>
<STX>H00;o0200,0200;c60;k32;d0,30;<ETX>
<STX>L1;o102,102;f0;l575;w5;<ETX>
<STX>R<ETX>
<STX><ESC>E4<CAN><ETX>
<STX>ä¼ æ„Ÿå™¨<CR><ETX>
<STX><ETB><ETX>
i think the issue here may be with formating the mulit-byte data into format it can be printed using the c60 font. Any
coding examples would be greatly appreciatedHi,
Welcome you post on the forum.
However, this is not the right forum for you. It is only for SAP Business One user. Please search entire forums first to find which one is more proper.
However, this issue may not be related to SAP at all. Search on the web would be better.
Thanks,
Gordon -
Use of XML parser to read/parse xml stored in DB as CLOB
Hello,
I am new to XML technology. I have xml data stored in DB as
CLOB. I need to parse this data to retrieve VALUE fro certain
tags. I would greatly appreciate any help. Any examples that
manipulate xml data stored in DB can be of extreme help.
DesiDBAAs you use Oracle 9.0.1. We suggest you use XMLType instead of
CLOB to store your XML documents.
You can use xmlType.extract() to get the elements within the
XMLDocuments.
Please refer to our Oracle9i XML Demo for examples.
http://otn.oracle.com/tech/xml/xdk_sample/xdkdemo_faq.html
For Instructions:
http://ws5.olab.oracle.com/faqdemo/source/instruction.xsql?
pagename=ins_xmltype
Or you have to do the SQL query to get XML documents and parse
each document and extract the content yourself using XML Parser
for PL/SQL.
Thanks. -
What data type is used for storing password,
What data type is used for storing pass word in oracle db, i mean if user inputs some thing from forms it should be in Encrypted form in db, please any help??
Thank you
HinaData type is VARCHAR2:
SQL> desc dba_users;
Name Null? Type
USERNAME NOT NULL VARCHAR2(30)
USER_ID NOT NULL NUMBER
PASSWORD VARCHAR2(30)
ACCOUNT_STATUS NOT NULL VARCHAR2(32)
LOCK_DATE DATE
EXPIRY_DATE DATE
DEFAULT_TABLESPACE NOT NULL VARCHAR2(30)
TEMPORARY_TABLESPACE NOT NULL VARCHAR2(30)
CREATED NOT NULL DATE
PROFILE NOT NULL VARCHAR2(30)
INITIAL_RSRC_CONSUMER_GROUP VARCHAR2(30)
EXTERNAL_NAME VARCHAR2(4000)
PASSWORD_VERSIONS VARCHAR2(8)
EDITIONS_ENABLED VARCHAR2(1)
AUTHENTICATION_TYPE VARCHAR2(8)You can use SQL function ORA_HASH to hash password: http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/functions124.htm#SQLRF06313. -
Indexes not getting used in schema having chinese data
I have a database with chinese data in it. When i execute few queries in that schema it does not use the available indexes of that table. Query takes long time to execute and the temp tablespace gets full. But when i execute the same query in another schema having english data the query executes quickly and uses all the indexes.
I tried gathering database statistics and rebuilding the indexes but that did not work out as well.
Can any body tell me whether the index creation differs for foreign languages? Do i need to create the indexes differently then normally we create?
why the indexes are not being used in the schema having chinese data?
Edited by: user621442 on Dec 17, 2009 10:03 AMuser621442 wrote:
I have a database with chinese data in it. When i execute few queries in that schema it does not use the available indexes of that table. Query takes long time to execute and the temp tablespace gets full. But when i execute the same query in another schema having english data the query executes quickly and uses all the indexes.
I tried gathering database statistics and rebuilding the indexes but that did not work out as well.
Can any body tell me whether the index creation differs for foreign languages? Do i need to create the indexes differently then normally we create?
why the indexes are not being used in the schema having chinese data?
Edited by: user621442 on Dec 17, 2009 10:03 AMHi,
I do not think so index would behave differently for different languages, yes sorting may behave in a diffierent way.
Can you post the explain plan from both the database.
And also nls_sort parameter from both the database.
I believe that you have order by clause which is not able to sort using index.
Regards
Anurag -
How to see Chinese data using SQL Plus?
Hi,
Is it possible to see the Chinese character string saved in the database by using English version Sql Plus? The following data is set up in the table NLS_DATABASE_PARAMETERS in my oracle database. I'm really appreciated if anybody could help me.
Thanks,
Suwei Ma
[email protected]
PARAMETER VALUE
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET UTF8
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
PARAMETER VALUE
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZH:TZM
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZH:TZM
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_NCHAR_CHARACTERSET UTF8
NLS_RDBMS_VERSION 8.1.7.4.1Thanks for your repley. I don't think I need to change NLS_CHARACTERSET setup because I can load Chinese data into the database and also can see the data by running Chinese tool like NJStar Communicator. Therefore, I probably need to change the session level parameters, but not sure.
-
Calling a stored procedure with a CLOB as input parameter
Hello,
I was unsuccessfully trying to call a stored procedure with a clob as input parameter from my C++ application using occi.
Anyone got a working example to look at?
I already checked the thread Invalid OCI handle when creating a Blob which didn't help.
The problem seems to be that I don't have a lob locator to write my data (xml file) to. I tried creating a temporary clob using the sys.dbms_lob package which only resulted in a major headache on my part...
I would appreciate any help.
Kind regards
Horst
my environment:
Visual Studio 2008, C++ application
Oracle 11gTo start using a blob you have to insert it into the database and then get it back. Sounds weird but that is how it is. Here is a very simple program to do this:
#include<occi.h>
#include <iostream>
using namespace oracle::occi;
using namespace std;
int main()
try
Environment *env = Environment::createEnvironment(Environment::OBJECT);
Connection *conn = env->createConnection("hr","hr","");
string stmt1 = "insert into blob_tab values (:1) ";
string stmt2 = "select col1 from blob_tab";
Blob blob(conn);
blob.setEmpty(conn);
Statement *stmtObj = conn->createStatement(stmt1);
stmtObj->setBlob(1,blob);
stmtObj->executeUpdate();
conn->commit();
Blob blob1(conn);
Statement *stmtObj2 = conn->createStatement(stmt2);
ResultSet *rs = stmtObj2->executeQuery();
while(rs->next())
blob1 = rs->getBlob(1);
string stmt3 = "begin my_proc(:1) ;end;";
Statement *stmtObj3 = conn->createStatement(stmt3);
stmtObj3->setBlob(1,blob1);
stmtObj3->executeUpdate();
catch (SQLException e)
cout << e.getMessage();
/* The tables and procedure are primitive but ok for demo
create table blob_tab(col1 blob);
create or replace procedure my_proc(arg in blob)
as
begin
-- just a putline here. you can do other more meaningful operations with the blob here
dbms_output.put_line('hello');
end;
}Hope this helps.
Thanks,
Sumit -
XML Generation Using DBMS_XMLQuery
Hi,
I am generating XML using "DBMS_XMLQuery".
Requirement: To generate blank xml tag(Without data).
e.g : Table XXX has A,B,C,D columns.
I am using SQL : SELECT a AA,b BB,c CC,d DD FROM XXX;
<AA>1 </AA>
<BB>2 </BB>
<CC>3 </CC>
(Note : Columns A,B and C has Values but "d" column does not have value).
Since "D" column doesnot have value,it is not generating XML tag.
So ,How to generate XML tag(e.g <DD> </DD>) without Value?
Any idea,how to achieve the above?
Thanks in advance.
Rgds,
Manoj
==========================
<?xml version = '1.0'?>
<ORDERS>
<ORDER num="1">
<MESSAGE_ID>1</MESSAGE_ID>
<SOURCE_SYSTEM>Oracle</SOURCE_SYSTEM>
<OPERATION>OrderRMA</OPERATION>
<DATETIME>3/21/2006 15:30:44</DATETIME>
<VERSION>1</VERSION>
<COUNTRY>AUS</COUNTRY>
<LANGUAGE>ENG</LANGUAGE>
<DESTINATION_SYSTEM>Manhattan</DESTINATION_SYSTEM>
<DESTINATION_WAREHOUSE>AUSVIS</DESTINATION_WAREHOUSE>
<ORDER_HEADER>
<ORDER_HEADER_ROW num="1">
----You can set the null attribute to true , so that the tag appears in your XML
see the statement in Bold.
DECLARE
queryCtx dbms_xmlquery.ctxType;
result CLOB;
BEGIN
-- set up the query context
queryCtx := dbms_xmlquery.newContext(
'SELECT empno "EMP_NO"
, ename "NAME"
, deptno "DEPT_NO"
, comm "COMM"
FROM scott.emp
WHERE deptno = :DEPTNO'
dbms_xmlquery.setRowTag(
queryCtx
, 'EMP'
dbms_xmlquery.setRowSetTag(
queryCtx
, 'EMPSET'
DBMS_XMLQUERY.useNullAttributeIndicator(queryCtx,true);
dbms_xmlquery.setBindValue(
queryCtx
, 'DEPTNO'
, 30
result := dbms_xmlquery.getXml(queryCtx);
insert into clobtable values(result);commit;
dbms_xmlquery.closeContext(queryCtx);
END;
select * from clobtable
<?xml version = '1.0'?>
<EMPSET>
<EMP num="1">
<EMP_NO>7499</EMP_NO>
<NAME>ALLEN</NAME>
<DEPT_NO>30</DEPT_NO>
<COMM>300</COMM>
</EMP>
<EMP num="2">
<EMP_NO>7521</EMP_NO>
<NAME>WARD</NAME>
<DEPT_NO>30</DEPT_NO>
<COMM>500</COMM>
</EMP>
<EMP num="3">
<EMP_NO>7654</EMP_NO>
<NAME>MARTIN</NAME>
<DEPT_NO>30</DEPT_NO>
<COMM>1400</COMM>
</EMP>
<EMP num="4">
<EMP_NO>7698</EMP_NO>
<NAME>BLAKE</NAME>
<DEPT_NO>30</DEPT_NO>
<COMM NULL="YES"/>
</EMP>
<EMP num="5">
<EMP_NO>7844</EMP_NO>
<NAME>TURNER</NAME>
<DEPT_NO>30</DEPT_NO>
<COMM>0</COMM>
</EMP>
<EMP num="6">
<EMP_NO>7900</EMP_NO>
<NAME>JAMES</NAME>
<DEPT_NO>30</DEPT_NO>
<COMM NULL="YES"/>
</EMP>
</EMPSET>
http://sqltech.cl/doc/oracle9i/appdev.901/a89852/d_xmlque.htm -
How to create Nested (Multi level ) tag in XML using DBMS_XMLQUERY function
Hi,
I need Following out put in CLOB Column.
XML format Like :
<?xml version="1.0" encoding="UTF-8"?>
<ReceiptHeader>
<Id>1234556</Id>
<Type>DD</Type>
<Receipts>
<ReceiptDEO>
<StoreId>11380001</StoreId>
<EmployeeId>NOLO980</EmployeeId>
<LineItems>
<ReceiptLineItem>
<CartonId>ABC12345</CartonId>
<ShippedQty>1.0000</ShippedQty>
<UnitCost>118.500000</UnitCost>
</ReceiptLineItem>
</LineItems>
<ReceiptDate>Wed Jun 20 11:50:01 CEST 2012</ReceiptDate>
<ReceiptNumber>3127855</ReceiptNumber>
</ReceiptDEO>
</Receipts>
</ReceiptHeader>
And i'm using dbms_xmlquery.newcontext ( );
Can you please help to get above output.
- Thanks,
PallaviHi ,
Thanks for reply .
Version is "Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production".
First I tried with DBMS_XMLGEN ,, it doesnt work properly.
Then tried with XMLAGG and XMLELEMENT but giving me output in 1 row. I need proper XML format.
Following is some data, For which I had created view of 2 tables.
ID STORE_ID EMPLOYEE_ID ACTUAL_ARRIVAL_DATE CARTON_ID SHIPMENT_ID QUANTITY_RECEIVED UNIT_COST RECEIPT_DOC_ID RECEIPT_Date
3772 12340001 PALS001 16-Feb-11 2A632 29 28.000 118.50000 1234 16-Feb-11
3775 12340001 PALS001 16-Feb-11 1A633 30 120.000 218.50000 7866 16-Feb-11
3776 12340001 PALS001 16-Feb-11 2A634 30 75.000 345.75000 7876 16-Feb-11
3773 12340001 PALS001 16-Feb-11 3A632 30 45.000 200.10000 7869 16-Feb-11
3774 12340001 PALS001 16-Feb-11 3A632 30 10.000 450.45000 7869 16-Feb-11
Please suggest better way..
-Thanks,
Pallavi -
EXTRACT function and Chinese data
Hi !
I'm working with PL/SQL web applications, and I'm having trouble viewing it on a webpage when I use EXTRACT function for Chinese data.
<abccompany> <department> 凯伦·威廉斯是一家小型社区制药厂的所有者,她正考虑开始提供药方递送的服务,同时也已经就此事征求了保险专家鲍勃·布朗的意见。凯伦询问鲍勃,需要购买哪些保险、</department></abccompany>
The Chinese xml data is stored as 'xmltype' in the Oracle database.
1)
When I run the below query, the output shown on a web page is upside down question marks like this
select v.xtext.EXTRACT('/abccompany/department/text()').GetClobVal()
into text
from case_text v
where case_identifier=inIdx;
htp.print('<html><body>')
htp.print(text);
htp.print('</body></html>');
2)
However, the EXTRACT function works perfectly for English data.
3)
I also observed that, when I replace
select v.xtext.EXTRACT('/abccompany/department/text()').GetClobVal()
with
to_clob(xtext)
the web page displays the Chinese contents of the whole file and not just within the nodes <abccompany><department>.
How can I make Extract function work with Chinese data ?
Any help appreciated !
-SaraSara
This normally happens when the client character set is not capable of showing chinese data. For instance on my laptop I cannot show the results of an extract() which returns chinese or japanese data in sqlplus (which cannot show chinese data on my machine) but I can in ISQL*PLUS which is web based and can show chinese data.
THis might be a result of your NLS_LANG settings. The database translates from the database character set (I'm assuming AL32UTF8 in this case, into the client character set (as defined by NLS_LANG). Again if the characters cannot be converted this can cause this issue. -
Insert Chinese Data(Character Set
Can any Chinese DBA tell me how to store chinese data in Oracle 8.1.5.0.0 Database.
I tried the combination of UTF8 database character set with UTF8 national character set and UTF8 database character set with ZHS16MACCGB231280 national character set. A column in a table was defined as nchar/nvarchar2. But when I tried to insert chinese data into the column using insert into... command, I always got the error message 'Character Set Mismatch'.Originally NCHAR was defined for a few selective fixed with Aisan character sets. In 9i it was redefined to support unicode. For 8.1.5 you will need to store your Chinese data in char, varchar, and CLOB data types.
-
Data Connection Library used in the workbook is not in a trusted location.
I got a requirement to display excel charts with data source as SharePoint list.
Here are the steps which I am following:
Exported SharePoint list to excel sheet and exported connection file to local drive.
Uploaded to data connection library.
Created a new excel file and consumed data from connection file which was stored in data connection library.
Published the excel sheet to document library with publish options as Chart and Pivot Table.
Able to see Excel Chart and Pivot table from the browser.
Getting Error when I try to refresh the excel sheet to get updated data from SharePoint list.
I added data connection library details to Trusted Data Connection & Trusted File locations still I am getting error. That .odc file is not in Trusted Location.
"The Data Connection File used in the workbook is not in a trusted location. The following connections
failed to refresh:"
Please help me on this and suggest if there is any other approach to fulfill this requirement.Hi Pratik,
Thanks for your input.
I created a new document library and data connection library and tried the steps mentioned below:
Configuration
Enable Claims to Windows Token Service
The first step, check the status of the Claims to Windows Token Service on SharePoint.
Use the following instructions to check and enable the Claims to Windows Token Service.
In Central Administration, in System Settings, click Manage services on server.
Select Claims to Windows Token Service, and then click Start.
Verify the service is also running in the Services console:
In Administrative Tools, click Services.
Start the Claims to Windows Token Service if it is not running.
Create a New Secure Store Application
Create a New Secure Store Target Application and set the credential.
This credential will be used by SharePoint to access the database. The account set into this step need to have access to the database or SSAS cube/tabular databases.
Use the following instructions to create and set credential.
In Central Administration, in Application Management, click Manage service applications.
Click Secure Store Services, and then click New.
Target Application Settings:
Tagert Application ID: ExcelServicesSSS
Display Name: Excel
Service Secure Store App
Contact e-mail: [email protected]
Target Application Type: Individual
Target Application Page URL: None
Click Next.
Click Next again.
Target Application Administrators: contoso\administrator
(Type the user account that will administrate the Secure Store Application.
Click OK.
Select Target Application ID ExcelServicesSSS, and then click Set Credential.
Type Credential Owner, Windows User Name and Password.
Configure Excel Services
Add the Application Id created in the previous step to the Excel Services and configure the Trusted Data Connection Library.
Use the following instructions to add the Application ID.
In Central Administration, in Application Management, click Manage service applications.
Click Excel Services Application, and then click Global Settings.
On External Data, Application ID type ExcelServicesSSS.
Click OK.
Click Trusted Data Connection Libraries.
Click Add Trusted Data Connection Library.
Address: http://<sharepoint_site>/ (Enter
the Data Connection Address)
Click OK.
But no luck in resolving the issue. Anyhelp would be really thankful.
Please clarify whether can we pull data from sharepoint list to excel services to display charts?
Regards,
N.Srinivas
Maybe you are looking for
-
when I right click on autofil a widow comes up with my profiles, I see no way to simply choose one and have all the info filled in. I have to click each item, name , address ect to have it show on whatever form I am trying to fill
-
I lost my Nokia Asha 201 calculator. Kindly who can assist on how to I recover it back? Moderator's note: We have provided a subject-related title to help other forum users easily view and respond to this post.
-
Problem of acquiring color image
Now I try to acquire color image but show in grayscale real time with filter it before. The result is so slow on monitor. How can I do to acquire the filter image faster.Any help very appreciated.
-
Python - Screenkey and Key-mon won't start (SOLVED)
You can see from the information supplied below that screenkey is set to use python2 while key-mon is not. However, the errors are pretty similar. What could be done? vaio@nando, Wed Oct 27 06:56:53 ~ $ bash >>> screenkey Traceback (most recent call
-
How to initialize insert form as empty instead of showing values
Hi All, i am new to ADF and Jdeveloper, maybe my question is easy for many of you, i searched the forum i could not find what i was looking for. I am using Jdeveloper 11.1.2.3.0. I want to create input form that starts as empty then on button click t