Escape character onclick xml dataset issue
hi everyone!
i have a function that sets off a bunch of spry effects etc, within an <a onclick="function(dsdata::variable);" href=etc.
the parameters come from an xmldata data set
however some of the data contains single quotes and it ruins the statement
ie:
onclick = "launcher('The apostrophe ruined the statement's syntax');"
i know i can get it by doing \' but i cant put the \ in the xml file!
how do we get around this?
lol i keep answering all my own questions!
i got round it by putting the variable in the id of the <a> ie.
<a id="{variable}" onclick = "launcher(this.id, this.href);" href="page.html">
Similar Messages
-
Invalid Escape Character Issue
I seem to be getting this error when I try to post this simple snippet
online
<%--
This page lists topics for a selected forum.
--%>
<%@ page errorPage="/misc/error.jsp"
import="java.net.*" %>
<HEAD>
<body>
test
Triggers this message
D:\dev\projects\remax\servletclasses\examples\jsp\_admin\_useradmin1.java:15
: Invalid escape character.
probably occurred due to an error in admin\useradmin1.jsp line 7:
import="java.net.*" %>
The thing fails ...citing invalid escape chracter even though this shouldn't
be happening.... Here's what is weird...file name is userAdmin.jsp. But
when I save this as test.jsp and run it...it runs fine. Any ideas?
seanB
"Sean Barenz" <[email protected]> wrote:
>I seem to be getting this error when I try to post this simple snippet
>online
>
><%--
> This page lists topics for a selected forum.
>--%>
>
>
><%@ page errorPage="/misc/error.jsp"
> import="java.net.*" %>
>
><HEAD>
><body>
>test
>
>
>Triggers this message
>
>D:\dev\projects\remax\servletclasses\examples\jsp\_admin\_useradmin1.java:15
>: Invalid escape character.
>probably occurred due to an error in admin\useradmin1.jsp line 7:
>import="java.net.*" %>
>
>
>The thing fails ...citing invalid escape chracter even though this shouldn't
>be happening.... Here's what is weird...file name is userAdmin.jsp. But
>when I save this as test.jsp and run it...it runs fine. Any ideas?
>
>seanB
>
>
Hi,
This is a bug in the Weblogic. It has been fixed in one of the recent SP. U download weblogic 4.5.1 SP7 and install the weblogic451sp7.jar, weblogic451sp7boot.jar in /weblogic/lib. Also make sure that in the startWeblogic.cmd, u point to these jars in the classpath.
Good luck
Bye
Jayakumar.D
-
Can Linux recognize the escape character?
Hi,
It's possible that this problem doesn't belong here. But please give it a try.
I am developing an project using JSP. It includes image uploading. after image uploading, I use a javascript function popUp(url, ...) to open a new window and display this image. The very strange thing is that, sometimes the link can work, open a new window and display the image while sometimes the link can't work, or it only works for one time, then it fails. I couldn't find the reason yet. it works on IE, and not on Netscape and also not work on Linux OS while do work on Window2000. Can somebody take a look at the following link and tell me how to change it to make sure it is work on Linux OS and netscape. What's the difference between OS and windows to specify a String(that is, url of a link). The linux OS seems interperte \" to ", so it cannot recognize the full url.
The link is :
imageLink[i] = "<a href='showForm' onclick=\"popUp('" + request.getContextPath() + "/displayForm.jsp?filename=" + sdb.getImageFileName(i)+"&fileDesc=" +sdb.getImageDesc(i) + "', 'showForm', '600', '450', 'yes'); return false;\">"+sdb.getImageDesc(i)+"</a>";
Thanks in advance!
jmlingLinux will recognize the escape character. It looks like you might have other difficulties with your imageLink tag. For example, I think you need to use tags when you use Java inside your html or javascript..
onclick=\"popUp(" + <%= request.getContextPath() %> + "/displayform.jsp?... -
Escape character for apostrophe ' in JDBC receiver channel
Hi all,
We have Proxy to JDBC scenario in our project. This interface is working fine with unicode data but when there is an apostrophe( ' ) coming in any of the field values ( ex: DOWTHERM 'J' MODEL19QAGB1G ) , the message is failing in receiver JDBC channel.
can anyone please tell us how to handle single quote in JDBC receiver channel.
I have read in SAP help documentation that apostrophe is a reserved character in SQL syntax and is therefore replaced by an escape character if it occurs within value strings. There is a option to JDBC receiver communication channel under "SQL SYNTAX PARAMETER" to specify the escape character for apostrophe.
Can any please tell us which value needs to be maintained in the channel to avoid this error.
Regards
JagruthiHi Prateek,
Thanks a lot for you inputs.
This issue is solved now. We have replaced single quote with two single quotes and then did the hasQuote mapping as described in the blog.
/people/prateek.srivastava3/blog/2009/04/02/unicode-handling-for-ms-sql-server
No value needs to be maintained in channel(SQL SYNTAX PARAMETER ).
But just want to understand the difference between replacing the ' with '' in mapping and using SQL SYNTAX PARAMETER option in communication channel.
Both should ideally result in same output. But it didnu2019t work when we tried with two single quotes in SQL SYNTAX PARAMETER (Escape Symbol for Apostrophe) in communication channel without doing anything in mapping.
Regards
Jagruthi -
Spry xml datasets can't recognise images
Been trying all day to load a spry xml dataset with image
information into a table using the wizard. problem is, you can't
tell the wizard that the data in one of the columns is the path to
an image, so it sees it as a string and just sticks the path in the
table. I tried putting it in as html rather than string but really
I am firing into the dark here!
What have I missed?thanks for the reply. I found the issue in the path string,
along with having to edit the html tag directly, which I wasn't
expecting, being used to DW doing it all for me! I found a lot of
the answer here:
http://www.csupomona.edu/~llsoe/42101/css/sprytables.htm
At least it stopped me being scared of html! -
Escape character before dot in dn entry after OID provisioning
Our OIM users are auto provisioned to OID using out of box OID connector. Everything works fine other than this issue.
When value for OIM's "User login" contain the character dot (say BILLY.BOB) , the corresponding dn entry in OID is created with an escape character (dn: uid=BILLY\.BOB,cn=users,dc=abc,dc=com) .
Example :
OIM's 'User Login' = BILLY.BOB
OID Entry created as
dn: uid=BILLY\.BOB,cn=users,dc=abc,dc=com
givenName: Billy
uid: BILLY.BOB
cn: Billy Bob
Note that the uid does not get the escape character, only the dn value is getting affected.
Thanks in advance!
KabiYou need to remove . in the Lookup defintion which comes with OOTB connector.
Re: OID Connector.User Id includes "\" when seen through ODSM -
Hello,
I have loaded an xml dataset from an XML file and I have used
the code below to manipulate the dataset.
if (ds.getDataWasLoaded())
var rows = ds.getData();
for (var i = 0; i < rows.length; i++)
rows
= "Changed";
How do i reflect this on the page?
I have tried to use ds.loadData(); but it loads the original
data of the page and not the manipulated data.
Thank youHi there Kinblas,
Here is my code:
<?xml version="1.0" encoding="iso-8859-1"?>
<items>
<item>
<name>room</name>
<id>999</id>
<pid>256</pid>
</item>
<item>
<name>Wallet</name>
<id>123</id>
<pid>999</pid>
</item>
<item>
<name>Coins</name>
<id>234</id>
<pid>123</pid>
</item>
<item>
<name>Notes</name>
<id>345</id>
<pid>123</pid>
</item>
<item>
<name>pencil case</name>
<id>000</id>
<pid>999</pid>
</item>
<item>
<name>pencil</name>
<id>111</id>
<pid>000</pid>
</item>
<item>
<name>pen</name>
<id>222</id>
<pid>000</pid>
</item>
<item>
<name>ruler</name>
<id>333</id>
<pid>000</pid>
</item>
<item>
<name>rubber</name>
<id>444</id>
<pid>000</pid>
</item>
</items>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN"
http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title>Untitled Document</title>
<script language="JavaScript" type="text/javascript"
src="../../spry_15/includes/xpath.js"></script>
<script language="JavaScript" type="text/javascript"
src="../../spry_15/includes/SpryData.js"></script>
<script language="JavaScript" type="text/javascript"
src="../../spry_15/includes/SpryDebug.js"></script>
<script language="JavaScript" type="text/javascript">
var dsItem = new Spry.Data.XMLDataSet("spry.xml",
"/items/item[id='999']", { useCache: true});
var dsItemsChildren = new Spry.Data.XMLDataSet("spry.xml",
"/items/item[pid='{dsItem::id}']", { useCache: true});
var dsItemsSiblings = new Spry.Data.XMLDataSet("spry.xml",
"/items/item[pid='{dsItem::pid}']", { useCache: true});
function selectItem(id) {
xpath = "/items/item[id=" + id + "]";
dsItem.setXPath(xpath);
function doSort() {
dsItem.sort("name", "toggle");
function doChange() {
if (dsItem.getDataWasLoaded()) {
var rows = dsItem.getData();
var rows1 = dsItemsChildren.getData();
var rows2 = dsItemsSiblings.getData();
for (var i = 0; i<rows.length ; i++) {
if (rows
["name"]=="rubber") {
rows["name"]="eraser";
for (var i = 0; i<rows1.length ; i++) {
if (rows1
["name"]=="rubber") {
rows1["name"]="eraser";
for (var i = 0; i<rows2.length ; i++) {
if (rows2
["name"]=="rubber") {
rows2["name"]="eraser";
Spry.Data.updateAllRegions();
</script>
</head>
<body>
<ul spry:region="dsItem">
<li spry:repeat="dsItem">Selected Item:
{name}</li>
</ul>
items Siblings
<ul spry:region="dsItemsSiblings">
<li spry:repeat="dsItemsSiblings"><a href='#'
onClick="selectItem({id});">{name}</a></li>
</ul>
Items Children
<ul spry:region="dsItemsChildren">
<li spry:repeat="dsItemsChildren"><a href='#'
onClick="selectItem({id});">{name}</a></li>
</ul>
<input value="Sort" type="button" onClick="doSort();">
<input value="Change" type="button"
onClick="doChange();">
</body>
</html>
When I click on sort, it fires off doSort which finds all
occurences of 'rubber' and changes them to eraser, but when
clicking on the links which result in setting the xpath, the cache
is not used but the original xml is used and the word 'rubber'
reappears.
I hope this make it clear.
Thanks -
Spry Menu Using Nested XML Dataset (Spry 1.6)
I have a vertical menu with a few items. One of which is
labeled Products which has submenus. I want to have that submenu
read from a Nested XML dataset. Using a single dataset for one
level in a menu is easy enough, but the subenu will have submenus.
Example Menu:
Home
Company
Products
|-- Product 1
|-- Item 1
|-- Item 2
|-- Item 3
|-- Product 2
|-- Item 1
|-- Item 2
|-- Product 3
|-- Item 1
|-- Item 2
|-- Item 3
|-- Item 4
|-- Product 4
|-- Item 1
|-- Item 2
|-- Product 5
I have been looking for an easy way to use the Spry Nested
XML Dataset to create the Product/Item menu. The number of Products
may vary as well as the number of Items in each Product submenu
(also, some Products may not have Items).
I already have an ASP page that creates the XML data from a
database.
Schema follows (XSD ):
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="
http://www.w3.org/2001/XMLSchema">
<xsd:element name="products">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="product_type"
maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="type_name" maxOccurs="1"
type="xsd:string"/>
<xsd:element name="type_url" maxOccurs="1"
type="xsd:anyURI"/>
<xsd:element name="product_name"
maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="item_name" maxOccurs="1"
type="xsd:string"/>
<xsd:element name="item_url" maxOccurs="1"
type="xsd:anyURI"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
I have been programming for 17 years but am new to Spry. If
this cannot be done easily with the Spry framework, I'll probably
wind up splitting the XML data into 2 files (Products and Items)
then writing a nested loop and call each by row, but then I have to
find out how Spry Datasets reference XML data. Figuring out how to
call rows from the XML data shouldn't be so bad, but this method
just seems like such a hassle for something that should be easy.
Pseudocode follows:
j=1
i=1 to TotalNumberProducts
display Product i from Products
ItemsExist=true
While ItemsExist
if j > TotalNumberItems | Item j is not for Product then
ItemsExist=false
else
display Item j from Items
j++
Wend
Next
Thanks in advance for any help or direction!That's exactly what I'm trying to do. However, I implemented
that code and the submenus won't appear. I suspect the submenus
aren't finding the field names from the Nested XML Dataset. The
first level of Product menus work great (this is a submenu of the
overall menu) and correctly identify products that do not have
submenus, so I know it's picking up the number of records in the
Nested Dataset correctly - it just won't display the data in the
next level of menu.
variable and script declarations:
<script src="SpryAssets/SpryMenuBar.js"
type="text/javascript"></script>
<script src="SpryAssets/xpath.js"
type="text/javascript"></script>
<script src="SpryAssets/SpryData.js"
type="text/javascript"></script>
<script src="SpryAssets/SpryNestedXMLDataSet.js"
type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarVertical.css"
rel="stylesheet" type="text/css">
<script type="text/javascript">
<!--
var productMenuData = new
Spry.Data.XMLDataSet("products.asp", "products/product_type");
var productMenuDataItems = new
Spry.Data.NestedXMLDataSet(productMenuData, "product_name");
//-->
</script>
Code for menus:
<ul id="NavMenu" class="MenuBarVertical">
<li><a
href="index.html">Home</a></li>
<li><a
href="company.html">Company</a></li>
<li><a href="franco_giberti.html">Franco
Giberti</a></li>
<li><a class="MenuBarItemSubmenu"
href="products.asp">Products</a>
<ul spry:region="productMenuData
productMenuDataItems">
<li spry:repeat="productMenuData"><a
class="MenuBarItemSubmenu" href="{type_url}"
spry:if="{productMenuDataItems::ds_RowCount} !=
0">{type_name}</a> <a href="{type_url}"
spry:if="{productMenuDataItems::ds_RowCount} ==
0">{type_name}</a>
<ul spry:if="{productMenuDataItems::ds_RowCount} !=
0">
<li spry:repeat="productMenuDataItems"><a
href="{productMenuDataItems::item_url}">{productMenuDataItems::item_name}</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="contact.html">Contact Us</a>
<!-- end #sidebar1 -->
</li>
</ul>
XML:
<products
xsi:noNameSpaceSchemaLocation="products.xsd">
−
<product_type>
<type_name>Pasta Sauce</type_name>
<type_url>pt_2.asp</type_url>
−
<product_name>
<item_name>Putenesca</item_name>
<item_url>pn_3.asp</item_url>
</product_name>
−
<product_name>
<item_name>Arrabiata</item_name>
<item_url>pn_4.asp</item_url>
</product_name>
−
<product_name>
<item_name>Pesto</item_name>
<item_url>pn_5.asp</item_url>
</product_name>
−
<product_name>
<item_name>Basil and Tomato</item_name>
<item_url>pn_6.asp</item_url>
</product_name>
−
<product_name>
<item_name>Bolognese</item_name>
<item_url>pn_7.asp</item_url>
</product_name>
−
<product_name>
<item_name>Carboniera</item_name>
<item_url>pn_8.asp</item_url>
</product_name>
</product_type>
+
<product_type>
<type_name>Organic Olive Oil</type_name>
<type_url>pt_3.asp</type_url>
−
<product_name>
<item_name>Original</item_name>
<item_url>pn_9.asp</item_url>
</product_name>
−
<product_name>
<item_name>Basil</item_name>
<item_url>pn_10.asp</item_url>
</product_name>
−
<product_name>
<item_name>Herbs</item_name>
<item_url>pn_11.asp</item_url>
</product_name>
−
<product_name>
<item_name>Sun Dried Tomato</item_name>
<item_url>pn_12.asp</item_url>
</product_name>
</product_type>
+
<product_type>
<type_name>Organic Spreads</type_name>
<type_url>pt_4.asp</type_url>
−
<product_name>
<item_name>Putenesca</item_name>
<item_url>pn_13.asp</item_url>
</product_name>
−
<product_name>
<item_name>Arrabiata</item_name>
<item_url>pn_14.asp</item_url>
</product_name>
−
<product_name>
<item_name>Pesto</item_name>
<item_url>pn_15.asp</item_url>
</product_name>
−
<product_name>
<item_name>Basil and Tomato</item_name>
<item_url>pn_16.asp</item_url>
</product_name>
−
<product_name>
<item_name>Bolognese</item_name>
<item_url>pn_17.asp</item_url>
</product_name>
−
<product_name>
<item_name>Carboniera</item_name>
<item_url>pn_18.asp</item_url>
</product_name>
</product_type>
+
<product_type>
<type_name>Organic Grilled Vegetables</type_name>
<type_url>pt_5.asp</type_url>
−
<product_name>
<item_name>Putenesca</item_name>
<item_url>pn_19.asp</item_url>
</product_name>
−
<product_name>
<item_name>Arrabiata</item_name>
<item_url>pn_20.asp</item_url>
</product_name>
−
<product_name>
<item_name>Pesto</item_name>
<item_url>pn_21.asp</item_url>
</product_name>
−
<product_name>
<item_name>Basil and Tomato</item_name>
<item_url>pn_22.asp</item_url>
</product_name>
−
<product_name>
<item_name>Bolognese</item_name>
<item_url>pn_23.asp</item_url>
</product_name>
−
<product_name>
<item_name>Carboniera</item_name>
<item_url>pn_24.asp</item_url>
</product_name>
</product_type>
−
<product_type>
<type_name>Truffle Products</type_name>
<type_url>pt_6.asp</type_url>
</product_type>
</products>
Any further guidance would be very much appreciated! -
Query of Queries (QofQ) Escaped Character Problem
Hello All,
I'm trying to run a query or queires (QofQ) and I'm doing a
LIKE comparison that looks for bracket characters ([ ]) within a
string, however ColdFusion is ignoring the brackets. How can I
escape the bracket character? So far I have only been able to
escape the percent sign based on the ColdFusion Live Docs. The
error message I get when I run the query below is:
Invalid Escape Sequence. Valid sequence pairs for this escape
character are: "\%", or "\_".
Here is the query:
<cfquery dbtype="query" name="getLogs">
SELECT *
FROM GetLogs
WHERE Description LIKE '%\[User:#UserID#\]%' ESCAPE '\'
</cfquery>
Thanks for your help!You are correct. If you leave the brackets in the LIKE
statement, it will return results as if the brackets weren't there
at all.
Perhaps I need to figure out the ASCII character value of the
bracket and include it that way i.e. #Char(?)# where the question
mark would be the numerical value of that character.
My temporary solution has been to leave off the starting
bracket:
<cfquery dbtype="query" name="getLogs">
SELECT *
FROM GetLogs
WHERE Description LIKE '%user:#UserID#]%'
</cfquery>
This has (so far) returned the results i'm looking for
although its not as 100% accurate without that beginning [ in the
LIKE statement. -
Urgent Help - in using Escape character
hai,
i have problem in using escape character..
can anyone help me out in the same...
sb.append(<jsp:getProperty name="resume_main" property="name"/>);
//error i am getting is -- Missing term, ')' expected.
pl help me out in using the escape character in the above statement.
thanx in advance
regards
koeltry
sb.append("<jsp:getProperty name='resume_main' property='name'/>");
or
sb.append("<jsp:getProperty name=\"resume_main\" property=\"name\"/>");
both will work -
Bypass Adapter URI Endpoint with Escape Character for Web Service
Dear All,
I would like to apply by pass adapter URI Endpoint for XI webservice, the default format is
http://<host>:<port>/sap/xi/engine?type=entry&version=3.0&Sender.Service=<BusinessService>&Interface=<namespace>^<Outbound Interface name>
If I am using format using with carat () character then there has no problem to the service, but consumer doesn't support carat () character. I instead the carat (^) with URL Escape Character (%5E)
http://<host>:<port>/sap/xi/engine?type=entry&version=3.0&Sender.Service=<BusinessService>&Interface=<namespace>%5E<Outbound Interface name>
Then error occurred
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<SOAP:Fault>
<faultcode>SOAP:Server</faultcode>
<faultstring>System Error</faultstring>
<detail>
<s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
<context/>
<code>RCVR_DETERMINATION.MESSAGE_INCOMPLETE</code>
<text>Message is incomplete. No Sender found</text>
</s:SystemError>
</detail>
</SOAP:Fault>
</SOAP:Body>
</SOAP:Envelope>
How to resolve this error...
Thank you.
Regards,
WengHi ,
as per my knowledge.....................
When you create a WSDL with the help of a wizard. In the Integration Directory, choose Tools -> Define Web Service to enter the wizard.
On Propose URL button, as this genertated URL default Point to Entegration Engine.. SO already proformance wise Good.
If You want to Point your URL to adapter engine , use below given URL this will point ur incoming soap message to SOAPadapter sender channel
http://<host>:<j2ee-port>/XISOAPAdapter/MessageServlet?channel=:<service>:<channel>.
Regards
Prabhat Sharma. -
Hi,
I've created a PHP page with a recordset consisting of joined tables. I've then exported it as XML. When I am on my main page and attempting to create an XML dataset, as I have done successfully before, when I click on "Get Schema" I get the exception "Type:UTFDataFormat Exception". I don't know why. I haven't had this before.
I have viewed my original PHP page with the recordset and I see all the information there, so I don't think there should be a problem.
Am I missing something?You know, I've got this problem again. I think the last time, I took out some special text characters - like the french e with an accent and the swedish o with a line through it, and then it worked. I hate to do that since it is an international site. And now I'm having this exception error again and I'm not sure why.
Any ideas of what I should look for? This time it is not an XML file created from a joined recordset - it's a simply recordset.
Very frustrating. -
Handling new line character in XML
Hi,
Question : How can we specify new line character in xml ?
Explaination for use :
I have a xml structure like :
<?xml version="1.0" encoding="UTF-8"?>
<MT_ISO8583_XML_request>
<TRANSDETAILS>.
<TRANSACTIONAMOUNT>0000000000000000</TRANSACTIONAMOUNT>
<SYSAUDITNUMBER>225998394671</SYSAUDITNUMBER>
</TRANSDETAILS>
</MT_ISO8583_XML_request>
I am using Java mapping to convert xml to some satndard flat file format. It works fine for single message.
To handle multiple message i am using Multimapping split. Multimapping needs xml tags in traget structure also to split the message.
To achieve it without BPM, I want to take the whole content of my target file to one tag. When i do this i lost all the new line characters aslo. How can i preserve my new line character using XML ?
Regards
KulwinderAre you sure, that the nl characters are deleted?
They are usually not shown in the XML display.
You can also use an adapter module instead of a Java mapping. So you can do a split in mapping, but the conversion to the flat file in the adapter module. If you have already a Java mapping for this purpose, you can easily create an adapter module based on that Java code.
Regards
Stefan -
XML dataset doesn't change in detail area
Thanks in advance for any help you might be able to lend...
My accordion layout has five panels all of which are using
different XML datasets. I have been wracking my brain to figure out
how to have multiple master data regions filter into one detail
region - I have one setup correctly, but when I change the focus on
the accordion menu, the other XML data is not displayed in the
detail region.
I understand why they do not populate, but I cannot figure
out what to include to have all data regions filter into the detail
area.
Thanks again in advance!
http://www.cateringlyons.com/menus.php"luke14free" <[email protected]> wrote in
message
news:f3bdm8$gsu$[email protected]..
> I am a new AJAX spry developer and i would like to ask
you a question.
> I have done a code that modifies the content of an xml
file after user
> writes
> something in a box. The code works(is written in php)
and my problem is
> that:
> the xml dataset in the page doesn't refresh. I mean if I
add something to
> the
> xml file the page isn't affected by the changes and
continues to display
> the
> old xml-data. I checked manually the xml file and it's
correctly writed
> and
> closed, and the file has the right permiossions. Can you
tell me why?
http://livedocs.adobe.com/en_US/Spry/1.4/WS95A48911-209C-4075-A90A-4FB06F6DAAA4.html
Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com -
How to use escape character in update statement.
Hi All,
I'm trying to update table using following sql update statement, but everytime it's asking me for the input due to the '&' value in below sql.
UPDATE xyz_xyz
SET NAME = 'ABC & PQR'
WHERE ID = (SELECT ID
FROM abc_abc
WHERE NAME = 'C & PQR');Please let me know how to use escape character syntax or let me know if there is any alternative solution.
Thanks,
VishwasHi,
By default, & marks a substitution variable name.
If you're not using substitution variables in that statement (or, if this is in PL/SQL, in that entire package or procedure) then the easiest thing to do is just diable substitution variables; then & will be a normal character:
SELECT DEFINE OFF
UPDATE xyz_xyz
SET NAME = 'ABC & PQR'
WHERE ID = (SELECT ID
FROM abc_abc
WHERE NAME = 'C & PQR');
SET DEFINE ONIf you can't do that, then & is always taken literally if it comes right before a single-quote, so you could say:
UPDATE xyz_xyz
SET NAME = 'ABC &' || ' PQR'
WHERE ID = (SELECT ID
FROM abc_abc
WHERE NAME = 'C &' || ' PQR');There is a SQL*Plus "SET ESCAPE" command, too, but if you use it, you have to worry about whether the escape character is to be taken literally or not.
SET ESCAPE \Yet another alternative is to make some other character, such as ~, mark the substitution variables:
SET DEFINE ~Read all about them in the SQL*Plus manual.
http://download.oracle.com/docs/cd/B28359_01/server.111/b31189/ch2.htm#sthref103
Maybe you are looking for
-
Need advice on creating buttons in email please
I am looking to send an email to a group of friends with an invitation attached that I have created in Pages. The invite is written in MadGab form so ideally I would like to place a button underneath that says "Uncle" that can have the invitation ani
-
Best config for init.ora
Hi, I am using OS:win 2k8 server 32 bit Oracle Database:11g EE 11.2.0.1.0 RAM: 8GB Like to now what is the best config parmaters for a OLTP with maximum of 100 users at the time When i use the DBCA command i got the template of init.ora where i am no
-
Occi::Number compilation problem in Linux
Hi, I got following error when I complile my application which uses OCCI (Oracle C++ Call Interface) shiped with Oracle 9.2. I added the compiler flag -Dlint . When I dont add the compiler flag I dont get following error. My machine is running RedHat
-
Business Objects + COM Call
Hello forum members, I have been involved with Business Objects and its Unified web services for the last two weeks for our project and I must say, it is very frustrating if you are not using Java or .NET. We have a business need to generate c
-
My macbook is running slow, how can I clean it up?
Is there a way to clean up my mac so that it does not run slow. Over the last few years I have noticed it loads slower and turns on slower. Any suggestions on ways to clean up my system so it can run more efficient?