Insertion of a special Character into a table
Hi all,
I came across a non keyboard character in an Oracle table (9i) and when i queried the table column with the following query
Code:
SELECT asciistr(col1) from test1;
I got the output as
\FFFD
\02DC
How could i insert the same character in my Oracle environment using the ascii code of the characters viz., \FFFD , \02DC
I tried inserting with the followin insert query,
INSERT INTO TEST1 VALUES ('\FFFD');
INSERT INTO TEST1 VALUES ('\\02DC');
but it inserted the above ascii codes as a character string rather than the special character.
Kindly advice on how to insert the special character using their ascii codes.
Please note that my Oracle version is 9i and its character set is WE8ISO8859P1.
Just not possible. Whatever I tried I never could get back what I inserted:
C:\temp>set NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252
C:\temp>sqlplus user/passwd@dev
SQL*Plus: Release 10.2.0.2.0 - Production on Mon May 14 16:42:53 2007
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.6.0 - Production
SQL> @afiedt.buf
SQL> SET NUMWIDTH 10
SQL> COLUMN a format a30
SQL> COLUMN a1 format 99999
SQL> COLUMN a2 format a10
SQL> COLUMN parameter format a15
SQL> COLUMN value format a20
SQL>
SQL> SELECT * FROM NLS_DATABASE_PARAMETERS WHERE PARAMETER IN ('NLS_CHARACTERSET
','NLS_TERRITORY','NLS_LANGUAGE')
2 /
PARAMETER VALUE
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CHARACTERSET WE8MSWIN1252
SQL>
SQL> ALTER SESSION SET NLS_LANGUAGE=american
2 /
Session altered.
SQL> ALTER SESSION SET NLS_TERRITORY=america
2 /
Session altered.
SQL>
SQL> INSERT INTO t VALUES (UNISTR ('\FFFD'))
2 /
1 row created.
SQL>
SQL> SELECT DUMP (a) a, ASCII (a) a1, ASCIISTR (a) a2 FROM t
2 /
A A1 A2
Typ=1 Len=1: 191 191 \00BFI think it is just not possible ...
Regards,
Michael
Similar Messages
-
How to insert the image or logo into the table as a field in webdynpro abap
Hi Friends,
Please tell me how to insert the image or logo into the table as a field in webdynpro abap.........Hi Alagappan ,
In your view layout you take table UI element and then you bind it with some context nodes.
The attributes of your nodes comes as a field.
Now in these fields you can set various properties and image is one of them.
Go to ->
1. View Layout -> Right Click on ROOTUIELEMENTCONTAINER -> INSERT ELEMENT -> TABLE
2. Right click on table -> Create Binding.
Here you have to bind it with the appropriate context node.
You will get two properties here
a- Standard Cell Editor :- ( make it image )
b- Standard properties :- ( If required set image properties ).
3. If you want put image from out side then import it as a mime object and set the source of your table field ( used as a image )
also have a look :-
[Image Properties|http://help.sap.com/saphelp_nw04/helpdata/en/f3/1a61a9dc7f2e4199458e964e76b4ba/content.htm]
Hope this will solve your problem.
Reply if any case of any issue.
Thanks & Regards,
Monishankar C -
Insert records from report program into R3 table
Hi
I wanted to insert records from report program into R3 table.
here is my code
data : itab type standard table of zemp initial size 10 with header line.
itab-EMPNO = '012'.
itab-ENAME = 'XXXX'.
itab-JOB = 'XXXX'.
APPEND itab.
insert ztable from table itab.
but i am getting the following error
the type of the data base table and work area/internal table "ITAB" are no unicode-converible.
how can I insert records from report program into R3 table
should I have to write move corresponding
pls guide
thanks
manianHi,
itab-EMPNO = '012'.
itab-ENAME = 'XXXX'.
itab-JOB = 'XXXX'.
APPEND itab.
insert ztable from table itab.
Do one thing
Data : itab type table of ztable with header line.
itab-EMPNO = '012'.
itab-ENAME = 'XXXX'.
itab-JOB = 'XXXX'.
APPEND itab.
insert ztable from table itab.
error will resolve, then try to make structure similar to ZTABLE -
[solved] inserting the same rows again into that table
i have a table with some rows now i want to insert the same rows again into that table
please tell me how to do it?
not using export please only sql query please
Message was edited by:
littlemasteri m expecting that u commented on me (may be i m wrong). Only once, which we had already dealt with further up. My comment was continuing along another 'off topic' re: code graffitti. Sorry I you felt I was continuing to get at you.
(If you look at the 'In Response to' part of ant post you can see which post any p[ost is intended to reply to) -
How to insert Serialised Object(XML DOM) into Oracle Table(as BLOB or CLOB)
we need a urgent help. How can we insert and retrieve the XML Document DOM Object into Oracle Table.Actually we used BLOB for insert the DOM Object,its inserted finely but we have a problem in retrieving that object, we got error when v're retrieving. so could you anyone tell us what's this exact problem and how can we reslove this problem If anyone knows or used this kind operation, pls let us know immediately.
Thanks in advance.Please repost your question in the appropriate XML forum, http://forums.oracle.com/forums/index.jsp?cat=51
-
How to insert data from APEX form into two tables
Hi,
I'm running APEX 4.1 with Oracle XE 11g, having two tables CERTIFICATES and USER_FILES. Some of the (useless) fields are cut to reduce information:
CREATE TABLE CERTIFICATES
CERT_ID NUMBER NOT NULL ,
CERT_OWNER NUMBER NOT NULL ,
CERT_VENDOR NUMBER NOT NULL ,
CERT_NAME VARCHAR2 (128) ,
CERT_FILE NUMBER NOT NULL ,
) TABLESPACE CP_DATA
LOGGING;
ALTER TABLE CERTIFICATES
ADD CONSTRAINT CERTIFICATES_PK PRIMARY KEY ( CERT_ID ) ;
CREATE TABLE USER_FILES
FILE_ID NUMBER NOT NULL ,
FILENAME VARCHAR2 (128) ,
BLOB_CONTENT BLOB ,
MIMETYPE VARCHAR2 (32) ,
LAST_UPDATE_DATE DATE
) TABLESPACE CP_FILES
LOGGING
LOB ( BLOB_CONTENT ) STORE AS SECUREFILE
TABLESPACE CP_FILES
STORAGE (
PCTINCREASE 0
MINEXTENTS 1
MAXEXTENTS UNLIMITED
FREELISTS 1
BUFFER_POOL DEFAULT
RETENTION
ENABLE STORAGE IN ROW
NOCACHE
ALTER TABLE USER_FILES
ADD CONSTRAINT CERT_FILES_PK PRIMARY KEY ( FILE_ID ) ;
ALTER TABLE CERTIFICATES
ADD CONSTRAINT CERTIFICATES_USER_FILES_FK FOREIGN KEY
CERT_FILE
REFERENCES USER_FILES
FILE_ID
NOT DEFERRABLE
What I'm trying to do is to allow users to fill out all the certificate data and upload a file in an APEX form. Once submitted the file should be uploaded in the USER_FILES table and all the fields along with CERT_ID, which is the foreign key pointing to the file in the USER_FILES table to be populated to the CERTIFICATES table. APEX wizard forms are based on one table and I'm unable to build form on both tables.
That's why I've created a view (V_CERT_FILES) on both tables and using INSTEAD OF trigger to insert/update both tables. I've done this before and updating this kind of views works perfect. Here is where the problem comes, if I'm updating the view all the data is updated correctly, but if I'm inserting into the view all the fields are populated at CERTIFICATES table, but for USER_FILES only the fields FILE_ID and LAST_UPDATE_DATE are populated. The rest three regarding the LOB are missing: BLOB_CONTENT, FILENAME, MIMETYPE. There are no errors when running this from APEX, but If I try to insert into the view from SQLDeveloper, I got this error:
ORA-22816: unsupported feature with RETURNING clause
ORA-06512: at line 1
As far as I know RETURNING clause in not supported in INSTEAD of triggers, although I didn't have any RETURNING clauses in my trigger (body is below).
Now the interesting stuff, after long tracing I found why this is happening:
First, insert is executed and the BLOB along with all its properties are uploaded to wwv_flow_file_objects$.
Then the following insert is executed to populate all the fields except the BLOB and it's properties, rowid is RETURNED, but as we know RETURNING clause is not supported in INSTEAD OF triggers, that's why I got error:
PARSE ERROR #1918608720:len=266 dep=3 uid=48 oct=2 lid=48 tim=1324569863593494 err=22816
INSERT INTO "SVE". "V_CERT_FILES" ( "CERT_ID", "CERT_OWNER", "CERT_VENDOR", "CERT_NAME", "BLOB_CONTENT") VALUES (:B1 ,:B2 ,:B3 ,:B4, ,EMPTY_BLOB()) RETURNING ROWID INTO :O0
CLOSE #1918608720:c=0,e=11,dep=3,type=0,tim=1324569863593909
EXEC #1820672032:c=3000,e=3168,p=0,cr=2,cu=4,mis=0,r=0,dep=2,og=1,plh=0,tim=1324569863593969
ERROR #43:err=22816 tim=1324569863593993
CLOSE #1820672032:c=0,e=43,dep=2,type=1,tim=1324569863594167
Next my trigger gets in action, sequences are generated, CERTIFICATES table is populated and then USER_FILES, but only the FILE_ID and LAST_UPDATE_DATE.
Finally update is fired against my view (V_CERT_FILES), reading data from wwv_flow_files it populates BLOB_CONTENT, MIMETYPE and FILENAME fields at the specific rowid in V_CERT_FILES, the one returned from the insert at the beginning. Last, file is deleted from wwv_flow_files.
I'm using sequences for the primary keys, this is only the body of the INSTEAD OF trigger:
select user_files_seq.nextval into l_file_id from dual;
select certificates_seq.nextval into l_cert_id from dual;
insert into user_files (file_id, filename, blob_content, mimetype, last_update_date) values (l_file_id, :n.filename, :n.blob_content, :n.mimetype, sysdate);
insert into certificates (cert_id, cert_owner, cert_vendor, cert_name, cert_file) values (l_cert_id, :n.cert_owner, :n.cert_vendor, :n.cert_name, l_file_id);
I'm surprised that I wasn't able to find a valuable source of information regarding this problem, only MOS note about running SQLoader against view with CLOB column and INSTEAD OF trigger. The solution would be to ran it against base table, MOS ID 795956.1.
Maybe I'm missing something and that's why I decided to share my problem here. So my question is how do you create this kind of architecture, insert into two tables with a relation between them in APEX ? I read a lot in the Internet, some advices were for creating custom form with APEX API, create a custom ARP, create two ARP or create a PL/SQL procedure for handing the DML?
Thanks in advance.
Regards,
SveThank you however I was wondering if there was an example available which uses EJB and persistence.
-
Insert date from YUI calendar into mysql table
Is there a way to insert the date selected from the YUI calendar into a mysql table?
I have been in trouble since last 2 days... I have tried all possible and explored any related topics.. Still I cannot address the problem.
Problem 1:
I have a simple jsp form which passed a bengali word.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<form action="Test2.jsp" method="post" >
<input type="text" value="কাকা" name="word">
<input type="submit" value="Next">
</form>
</body>
</html>
When this page is post, a java program( TestWord) is called by the Test2.jsp. TestWord insert the passed bengali word into a MySQL table. Then it retrieves again the inserted bengali word and display in Test2.jsp.
Test2.jsp:----
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<jsp:useBean id="get2" class="dictionary.TestWord" scope="session"/>
<jsp:setProperty name="get2" property="*"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<form action="" method="post">
<%
String s=get2.getWord();
out.write("Before converion onversion = "+s);
s = new String(s.getBytes("ISO-8859-1"),"UTF-8");
out.write(" After conversion = "+s);
%>
</form>
</body>
</html>
It gives the output something like:
Before conversion = �?া�?া After conversion = ??????
Problem 2:
The record in mysql table is inserted in bengali font (eg. কাকা). When I retrieve the record and display in a jsp page, I can see the bengali word (কাকা) properly. But if I insert the bengali word again in MySql table, then I see some string like "�?া�?া" storing in the table.
Please help me out..
Thanks in advance. -
Insert/Update multiple checkbox values into a table
Hi all,
I created an interactive report with checkboxes in it.
My application is like,
step 1: user will give his ID in a text box and click on 'submit' which redirects to IR page which has got checkboxes
step 2: IR report displays all the environments and access levels as two of its columns
step 3: if user checks on some box in IR, those particular environments and access levels (may be multiple environments and access levels) for that particular ID should get inserted into a table.
I have created a model application at http://apex.oracle.com/pls/apex/f?p=71510:20 (wokspace:test_me, username=test, paswrd: apex14gm)
I found this forum too, https://forums.oracle.com/thread/2387391?start=0&tstart=0. But I am confused of how to implement it!
How to achieve this??
Pls help me out....
Thanks in advanceHi Kanishkaa,
I've taken a look at your application.
So the things that I noticed that are wrong:
1)Your report: You created 2 items but you gave the 2 items the same idx. This is really weird I'm not sure if APEX knows how to handle this. Don't give 2 items the same idx. Furthermore you need to create 2 additional hidden items since you also want to store the access level and the environment.
2)The PL/SQL Process: Your PL/SQL Process: your making a type t_checkboxes, but your not actually doing anything with this type. Your not giving this any value. So obviously you get an error.
You really should rewrite this process based on the process in my blog. Please read it again carefully, if you just use the one insert statement you are using then even if you write a correct process that doesn't give any errors, the wrong data will be inserted.
Regards,
Joni -
Insert the MDX Query Data into SSMS Table
Hi, I'm using below query frequently on SSAS .
select * from $system.discover_commands
I want that when this query executed & If any output returns , then that output should be inserted into SSMS
Table(OLTP DB) .Hello,
You can use a linked server to SSAS to run queries from SQL Server against SSAS cubes and to insert the result into a relational table.
See e.g.:
Passing Queries from SQL Server to a Linked Analysis Server
Querying SSAS with SQL
Creating a Linked Server for Analysis Services
Olaf Helper
[ Blog] [ Xing] [ MVP] -
Inserting results from select query into another table
Hi: Is there a way to insert results returned from a SQL query into another table within the same SQL statement.
For example
SELECT a.SRCID,
SUM(DECODE(a.CLASS_ID,91147,1,0)) BLOCK,
SUM(DECODE(a.CLASS_ID,91126,1,0)) ALLOW,
FROM EVENT_DATA a
where
a.class_id in (91147,91126)
GROUP BY SRCID
order by TOTAL DESC;The columns returned SRCID, BLOCK and ALLOW need to go into another table called AGGREGATE_COUNT. This table has fields SRCID, BLOCK and ALLOW. Or is the only way this can be done from outside of SQL like using perl or C.
Thanks
RayINSERT INTO aggregate_count
( chart_id
, srcid
, block
, allow
SELECT 2234 chart_id
, srcid
, SUM(DECODE(class_id, 91147, 1, 0))
, SUM(DECODE(class_id, 91126, 1, 0))
FROM event_data
WHERE class_id IN (91147, 91126)
GROUP BY chart_id, srcid
ORDER BY total DESC; -
How to insert an in-line image into a table cell using Pages on OS X?
How can I insert an image into a table cell using Pages (OS X) without it becoming the cell background? I want it to be a regular in-line image, but can't figure out how to do this for the life of me. Thanks!
Welcome to Discussions.
To insert an image into a cell, select the cell, then go to the Graphics Inspector and from the Fill drop down choose Image Fill and then select then image you want. You can now select from a new drop down how you want the image to fit.
Walt -
How to discard the special character from field-Table.
Hi
In my data i am having a lot of SPECIAL CHARACTER also involved, I want to display only the consumer name (PURELY), is there any method/function module to discard the special character and display only the A-Z character as stored in DB.
Gauravif itab-field CA 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
or
if itab-field CP 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
then do ur else calculation.
else.
delete itab.
Edited by: tahir naqqash on Feb 17, 2009 4:27 PM
Edited by: tahir naqqash on Feb 17, 2009 5:21 PM -
How to insert & # special characters into oracle table?
I have a text value which contains special characters such as & and #.
After I pass from one page to another,
TEST& becomes "TEST&"
I put " " on the above test, otherwise amp; will be truncated by OTN).
TEST# becomes TEST (# is truncated).
Actually the value is saved in table like this: "TEST&"
How to solve this problem?
How to insert & into table without &
Thank you.
Edited by: user628655 on Jul 27, 2009 9:47 AM
Edited by: user628655 on Jul 27, 2009 9:49 AM
Edited by: user628655 on Jul 27, 2009 10:39 AMAvoid doing that through a link. If this is a page item then submit the page and redirect to the target page using a branching. On the target page, create a computation to compute the target item using the original page item as the source. If you are talking about a report, use the id to pass through the link and fetch the text column in an on load computation.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------------------ -
How can I read a file with ASCII Special Character into a SQL table using SSIS 2008?
I've tried everything to read this file and am getting no where. Help how can I read this file and load a SQL table?
RS - AscII - 30 (Record Separator)
GS - AscII - 29 (Group Separator)
Thank you for your assistance - Covi
Mark CovianWe can use script component as source/transformation to read the text file and assign the contains to a string. Split the string by chr(30) i.e RS and finally stored into an array or write to the output buffer of the script component.
For example on how to use script component refer this link
http://social.technet.microsoft.com/Forums/en-US/6ff2007d-d246-4107-b77c-624781baab38/how-to-use-substring-in-derived-column-in-ssis?forum=sqlintegrationservices
Regards, RSingh -
How to insert chinese or Japanese character into database
Hi,
Can any one please let me know how to insert chinese character to database.
We tried to insert some chinese character by copying but the characters are showing different while selecting from the database.
Should we install any font or something into database server for getting the character???Hi,
If your NLS_NCHAR_CHARACTERSET is set as AL16UTF16, then you can create a table with datatype NCHAR or NVARCHAR in the same instance and will be able to store foreign characters provided your client termional is configured to enter chinese characters.
Regards,
Mario Alcaide
http://marioalcaide.wordpress.com
Maybe you are looking for
-
I'm installing windows 7 64-bit on my imac which I've done before but I get a message that the partition is GPT even after I format the bootcamp partition. I just upgraded my hard drive to a 3tb and I'm allocating 1tb for windows. How can I fix this
-
Ink system failure printhead unrecognized
I keep getting ink system failure errors and printhead is missing or unrecognized. I have turned off and restarted the printer and unplugged and replugged the printer. I ran the diagnostics. At first it said there was a printhead problem but now it
-
Data not populating with the Lookup code
Hi All, Currently I am facing the problem in Production. Somebody has written the below ABAP code in Field routine. While loading transaction data, they was a lookup in the field routine to get data from Master data. Select /BIC/YOTLT_TYP INTO RESULT
-
Hi Guys, I know we can post incoming payments from F110 for a customer. I am not sure how we decide customer has paid how much amount so as to clear the invoices. Is scheduled incoming payment for the hou
-
Web Server on Windows XP?
I need to write a servlet to provide SQL data for a cell phone. I've written a J2ME app to access text from the web, but I know nothing about the other end. Do I have to install a whole new OS like Linux, or is there software that will run under XP a