Converting single quote to double - help please
Hi,
Please suggest me how to insert the dml_stmt into the table column..
I have the field called dml_statement field, in that user will give the dml statements..
my program will pass this argument to the procedure and that procedure will insert the data into the table called dml_table(in dml_stmt column)
For simple insert stmt, data is inserting into the table but for the dml whoes having the single quote, it does not getting inserted into the table...
Let me explain this more clearly:
1)ENTER THE DML_STMT : INSERT INTO TABLE_NAME(COL1) VALUES(3434);
ABOVE DML IS GETTING INSERTED BY THE PROCEDURE INTO THE TABLE DML_TABLE:
2)ENTER THE DML_STMT : INSERT INTO DML_TABLE(DML_STMT) VALUES('3424');
ABOVE DML IS NOT GETTING INSERTED BY THE PROCEDURE, I HAVE FOUND
THE PROBLEM TOO BUT CANT OVERCOME THIS.BECAUSE OF THE SINGLE QUOTE PROCEDURE
CANT INSERT THE ABOVE DML INTO THE DML_TABLE
{code}
I tried with replace function, but i cant pass the dml_stmt field
something like this :
select replace('INSERT INTO DML_TABLE(DML_STMT) VALUES('3424');','chr(39)','"') from dual;
i know above qry wont work, but i should do something like above to solve this ....
Please suggest me how to solve this prob ..
Regards,
Jame
Hi Satyaki De,
Its nice to meet you again, i am adding the one more parameter for the create_trigger parameter called dml_stmt.
There is a problem while inserting the dml_stmt which is having the single quote(')....please refer the screenshot for more details..
SQL> exec create_trigger('UPDATE','ADDREP','INSERT INTO TAB')
PL/SQL procedure successfully completed.
SQL> SELECT * FROM ADDREP;
EMPID ENAME SALARY AGE PH
400 JAME 60000 24 99292992
SQL> UPDATE ADDREP SET SALARY = 70000
2 WHERE EMPID = '400'
3 /
1 row updated.
SQL> SELECT * FROM AUDIT_ADDREP;
COL_NAME TAB_NAME OLD_VALUE NEW_VALUE DML_STMT
SALARY ADDREP 60000 70000 INSERT INTO TAB
SQL> exec create_trigger('UPDATE','ADDREP','INSERT INTO TAB VALUES('PROBLEM')');
BEGIN create_trigger('UPDATE','ADDREP','INSERT INTO TAB VALUES('PROBLEM')'); END;
ERROR at line 1:
ORA-06550: line 1, column 65:
PLS-00103: Encountered the symbol "PROBLEM" when expecting one of the following:
. ( ) , * @ % & | = - + < / > at in is mod not range rem =>
.. <an exponent (**)> <> or != or ~= >= <= <> and or like
between ||
The symbol ". was inserted before "PROBLEM" to continue.{code}Abt [create_trigger|http://forums.oracle.com/forums/thread.jspa?threadID=705952&start=30&tstart=0] procedure
how to pass dmlstmt to the procedure which is having single quote ?
Regards,
Edited by: Jame on Sep 20, 2008 1:17 PM
Similar Messages
-
String value changes single quote ' to double quote "
I am creating a list with different bill codes within single
quotes as follows
<cfset corlist = " '1100 ','1200 ','1300 ','1700 ','1800
','1950 ','7001 ' ">
when I do an output
for
<cfoutput>AND idbillcode IN ( #corlist
#)</cfoutput>
I get the values as follows
AND idbillcode IN ( '1100 ','1200 ','1300 ','1700 ','1800
','1950 ','7001 ')
However when I put the same string within a cfquery the
single quotes get replaced by double quotes as follows
AND idbillcode IN ( ''1100 '',''1200 '',''1300 '',''1700
'',''1800 '',''1950 '',''7001 '') which throws an error.
Anybody has any clues.
Thanks.However when I put the same string within a cfquery the
single quotes
get replaced by double quotes as follows
AND idbillcode IN ( ''1100 '',''1200 '',''1300 '',''1700
'',''1800
'',''1950
'',''7001 '') which throws an error.
Anybody has any clues.
That is ColdFusion escaping the single quotes, by doubling
them so that
you can search for strings such as "singhpk's code does not
work".
(Note the single quote/apostrophe that would normally break
this string
if it was not escaped.
To tell CF not to do this, one uses the
preserveSingleQuotes() function.
The documentation has all the details. -
Replace Single Quote with double quote
Hi All,
I have a String s="help'me'to'replace";
i want to replace single quote( ' ) in to double quote ( " )
The final out put should be like this help"me"to"replace
( Actually this string i have to pass in to an XML )
Please help any ones.replaceAll("'","\"");{code}
or just one of the String#replace() methods.
Edited by: sabre150 on Mar 17, 2009 11:48 AM -
How to replace single quote with double quote
hai all,
i have a problem,
i am trying insert a string containing single quote into ms-access database.
it is giving error.
how can i avoid this .if i replace a single quote in the text with double quote it will defenitely
insert into database.
in java.lang.String
replace () will not work to replace quote with double quote.
any otherway to solve this problem.
please mail me to [email protected]
thank you
sambareddy
inidajava.lang.String.replace () will not work to replace quote with double quote.Really?
String x = ...
x.replace( "'", "\"" ); -
Change XML declaration from single quote to double quote
Hi all,
i have the following problem in my File Receiver Adapter. My XML File has the declaration <?xml version='1.0' encoding='utf-8'?> (With single quotes ') and want to change it to <?xml version="1.0" encoding="utf-8" ?> (With double quotes ")
I use the XMLAnonymizerBean but this does not change the XML declaration.
Any ideas how to change the declaration
Thanks MaxHi Suraj,
on the Modul Tab i have the following:
1 | AF_Modules/XMLAnonymizerBean | Local Enterprise Bean | Anonymizer
2 | CallSapAdapter | Local Enterprise Bean | 0
Anonymizer | anonymizer.acceptNamespaces | http://Post.AG/PartnerInterface/Schemas/PVSdeAt/Aviso_V1.0 ns0 http://PostAG.PartnerInterface.Schemas.PVS_deAt.AvisoHeader ns1 http://PostAG.PartnerInterface.Schemas.PVS_deAt.AvisoShipper ns2
Anonymizer | anonymizer.quote | "
That is all what i have on the module tab.
I send the data as Text (not Binär). Thats all what i have in the adapter. Do you need any further information?
Regards, Max -
ReplaceAll() single quotes to double quotes
i've been trying to use the replaceAll() method to change single
quotes in a document to double quotes. All my attempts have
failed.
Thanks in advance,
EnaknonnelSorry, I was terse in my first post, but since you are just replacing one char
with another, using replaceAll is overkill -- it is meant to take a regular expression
search string. So keep it simple and use replace. I think you may have
chosen replaceAll because of that reassuring "All" in its name, but do check
the API: method replace replaces all occurrences.
One more thing: posting something like "All my attempts have failed" is itself
a failure. It tells us nothing concrete. A better post would have included
a short example program that was your best attempt. -
Convert GPT to MBR double check please.
So I'm trying to have Windows dual booting but don't currently have the right tables and stuff.
Partition table: GPT
File System: ext4
Running with bios-grub
I'll be using gdisk to do this but just need to make sure that I'm doing it properly. These are the steps gdisk ask and the options I choose:
1. hard drive: /dev/sda
2. option R : recovery and transform
3. option G: convert GPT to MBR then exit.
Now this is where I'm a little unsure, I'm prompted to give an 'mbr command', here are the options:
MBR command (? for help): ?
a toggle the active/boot flag
c recompute all CHS values
l set partition as logical
o omit partition
p print the MBR partition table
q quit without saving changes
r set partition as primary
s sort MBR partitions
t change partition type code
w write the MBR partition table to disk and exit
Is it safe to just choose 'w' to write and exit?
Thanks for you helps folksDear all,
Please do update... how to covert a varchar2 to date in GG. -
Ok, I give up. I cannot figure out the most elementary of concepts here and am tired and frustrated.
My code will not help the question so I won't waste space with it. Here is my problem:
I am creating an applet to calculate fabric yardage. I need to be able to read in the input which will either be an int or a double/float to 2 decimal places.
I will then use that to calculate yardage using a numberOfStrips * width style equation. This equation will need to be rounded up to the nearest integer, thus, a 2.34 will need to go up to a 3 not down to a 2.
I have tried every combination of float, double, int and cannot figure this out. I cannot use the double.parseDouble() to read in a double because Netscape will not recognize it and any time I attempt to cast to a double from an int, or vice versa, I just get 'loss of precision' errors from compilers.
I am giving up for now but I hope someone can help me figure this out. (Why don't they teach real world stuff like this in classes!)
TIAI don't understand what you mean by "I cannot use the
double.parseDouble() to read in a double because
Netscape will not recognize it" so I can't help
there.Wow, thanks everyone, I wil try these suggestions. when I was trying to use double.parseDouble() in netscape (communicator 4.78), it just doesn't do anything. It loads the applet, but when I press the button, nothing.
I found on another site, the O'Reilly site, and it said that Netscape doesn't recognize Double without the plug-in. Problem is, I am trying to install the plug-in, and it doesn't find Netscape as a browser option. Ugh. I have to assume that this will work for all users so if it crashes on Netscape, need to figure out how to get around that.
I will try these suggestions. -
To display combination of single quotes and double quotes in textfield
please send the code
Do this:
//put this into the head section
<head>
<script language="JavaScript">
<!--
function input(value){
document.getElementById('textfield').value = value;
//-->
</script>
</head>
//put this into the body section
<body>
<input type="text" name="textfield" id=textfield value="">
<br>
input quotes for whatever reason
</body>
//read the following tread:
http://forum.java.sun.com/thread.jsp?forum=45&thread=136985 -
Converting analog footage to digital help please!
I have a Canon GL1 and I tried running the VHS deck to the RCA cables to the GL1 then through to the Computer via Firewire but it doesn't work. Whenever I plug the firewire in the signal from the RCA is instantly gone. I heard you could use Sony cameras to convert Analog to Digital but it doesn't work with my GL1 also (I know you are supposed to use the "none controllable device" capture setting in FCP).
What I want is to go direct capture from my VHS deck to my camera to my computer without recording to minidv first.
Any help with this would be great!hi focused!
As an avid Canon user myself, I'm sorry to say that the GL1 does not support "digital pass through"--what you're trying to achieve by using the camera as an on-the-fly analog to digital converter. The newer GL2 (among other newer models) does.
However, you can record your VHS signal onto a miniDV tape then via firewire get it onto your Mac. A longer process, but do-able. That said, if you have a little money to spend there are some inexpensive analog-digital converters available.
Hope that helps and nice to talk to another islander
Cheers (and aloha). -
No restart, no safe mode, no single user... help please
Hi, tried a few tips from the net, no results,
All started with the grey screen and unable to restart it, try the safe mode, not starting, tried a few time with the command R, erased the HD several times, reinstal snow leop twice still no luck . just tried single user mode, get can t the command line... Any other trick I could tried before the Mac shop ?Throw some more stuff at it. PRAM reset: Cmd-Option-P-R at startup chime from a full shutdown. Also SMC reset. And remove all peripherals except essential ones, like a wired keyboard or mouse, if you are using those.
-
Query quote help-Please ignore this thread
Dear all,
Please ignore this thread.
Thanks for understanding
Kai
Edited by: KaiS on Nov 12, 2009 9:33 AMtry
and A.subno =''' || subno || ''' ;' from usr_inf where rownum <300;
those are two single quotes ('), not double quotes. -
Hi,
I am inserting a string literal that contains one or more single quotes. I know i have to use two single quote ('') to represent one single quote in my insert query and four single quotes('''') to show two single quotes. However, when i do a select from the table, all single quotes are escaped with a backslash in front of it (\'). This cause some problem when i display the string in html page. How can i skip the back slash and keep only the single quote in my select query? Thanks
Kim TituKim,
To insert single quote or double quote string try using the ascii values as below -
CHR(34) ==> " (double quote)
CHR(39) ==> ' (single quote)
Example:
Insert into emp(EMPNAME) values(CHR(39)||'TEST'||CHR(39));
Now,
Select EMPNAME from emp;
will give you the result - 'TEST'
Regards,
Murali Mohan -
Escape single quote from a String variable
Hi,
I have a String variable called "name" which i am using in my form tag.
<form name=test action="test.jsp?fname=<%=name%>" method="post">
But i am getting Javascript error if the "name" variable contains a string with some special characters like single quote( ' ).
Plz help me to escape this special char from my String variable.
Thanks..You need to url-encode the value using the URLEncoder class.
http://java.sun.com/javase/6/docs/api/java/net/URLEncoder.html
For example:
<form name=test action="test.jsp?fname=<%=URLEncoder.encode(name, "ISO-8859-1")%>" method="post"> -
Can I quote a single quote character so that I can use it in Replace()
Hi. How can I quote a single quote character so that I can use it in the Replace() function below. I'm attempting to query first_name records that contain a '.
select first_name, last_name
from ttms.prospect
where instr(first_name,"'") > 0
ERROR at line 3:
ORA-00904: "'": invalid identifierHi,
String literals are enclosed in single-quotes (not double-quotes).
To use a single-quote within a string literal, use two of them:
WHERE INSTR (first_name, '''') > 0In Oacle 10 (and up) you can also use Q-Notation:
WHERE INSTR (first_name, q'[']') > 0but you may find this more confusing for short literals containing only one single-quote.
Edited by: Frank Kulash on Mar 11, 2009 4:52 PM
Maybe you are looking for
-
How to use distribute form?
I know this has probably been answered a hundred times in these forums, but my searching has not turned up any answer that is useful to me as yet, so I will try posing the question anew. I am using Adobe Acrobat 9 Pro version 9.1.2 I have created a
-
Error while adding tcode in favorites
Dear experts, i got an error message when add tcode in portal favorites Management trasactions cannot be called directly-message no sf474 it comes in my devlopemt ecc system but in production i easily add tcode in favorites please help...............
-
SEVERE: DB Error during import of BC_SL_ACTIVE_PARTS
Hello all, We are trying to perform the system refresh using sapinst (load based) on AIX/DB2 UDB environment. During the "Import Java Dump" phase, we are getting the below error; SEVERE: DB Error during import of BC_SL_ACTIVE_PARTS SEVERE: Message: T
-
Is it possible to save/export and load search queries?
Currently, when I open the Find/Replace window (Apple+F), I see a long list over every query I have saved in the dropdown menu. This is not ideal for me because of the 100 queries, I might only use 1–10 for Project A, 11–20 for Project B, and so on.
-
Adobe Elements 11 Failure, Help?!
My Adobe Premiere Elements 11 will not open, when I click on the program there is no error message and nothing pops up, I have already uninstalled and reinstalled the program 3 times and I'm out of ideas...Need help!