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
koel
try
sb.append("<jsp:getProperty name='resume_main' property='name'/>");
or
sb.append("<jsp:getProperty name=\"resume_main\" property=\"name\"/>");
both will work
Similar Messages
-
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 -
Using Escape character for Multi character delimiter for flat files in IKM
Hi
I have an IKM using Jython, it is working fine for single character delimiter. But as per requirement I have to use multicharacter delimiter ;" (semi colon and double quotes).
I am taking this into variable using
filesep = "<%=snpRef.getSrcTablesList("", "[SFILE_SEP_FIELD]", "", "")%>"
but it is giving lexical error.
Can anybody help me with the use of escape character in current scenario?
Any other suggestions are also appreciated.
Thanks
AnkitHello,
A small tweak may solve your problem:
Instead of :
CONCATENATE wa_condstr ' bukrs = ' pa_bukrs INTO wa_condstr SEPARATED BY space.
Use:
CONCATENATE wa_condstr ' bukrs = ' 'PA_BUKRS' INTO wa_condstr SEPARATED BY space.
Then use this in SELECT.
Anyways for your answer the escape character for apostrophe is an apostrophe )
Try this you will understand:
DATA:
V_STR TYPE STRING VALUE ''''.
WRITE: V_STR.
BR,
Suhas -
Export Data Using Escape Character
Hi All
I have got a requirement where i need to export data from oracle with escape character.
eg. I am using a delimiter 237(í) and if the same character is present in data it should be escaped by escape character eg. /.
Once this file will get created i need to load this file in Netezza database which supports escape character.
Data in oracle table
FirstName Lastname Designation
abc xyz mnz
def ghío pqr
Data should be exported like below
FirstnameíLastnameíDesignation
abcíxyzímnz
defígh/íoípqr
Thanks.943994 wrote:
Thanks for the reply. I am new to Oracle and i am not able to find any command for exporting data in Oracle. I know we can do it manually using select statement but in that case we need to replace this delimiter with escape character and delimiter for all char fields.
In netezza we can directly do that without this. Please see below example and let me know if any such thing is present in Oracle.
SQL> CREATE EXTERNAL TABLE '/temp/test.csv' USING (REMOTESOURCE 'ODBC' DELIMITER 236 DATESTYLE 'YMD' DATEDELIM '-' TIMESTYLE '24HOUR' TIMEDELIM ':' MAXERRORS 0 ESCAPECHAR '\' NULLVALUE '' ) AS SELECT * FROM temp;
.CSV file created by above command:
abcíxyzímnz
defígh/íoípqr
Thankshttp://docs.oracle.com/cd/E11882_01/server.112/e22490/et_params.htm#sthref1293 -
Please help me urgently, Ajax Jsp issue (Escape Character issue)
Hi all,
in my application
i am making an ajax call with a paramter
like
http://www.abc.com/Login.jsp?query=%25
and iam encoding that parameter with encodecomponent() function of javascript
but
in my servlet iam getting the parameter as
query=%
how to solve this
if i am not clear
i will try to explain clearly again
so it is failing to decode it again
how to solve this issue
iam using firebug debugger
in that it is showing th url as specified above
but in params tab it shoCan you use URLDecoder.decode(String) on the parameter
[http://java.sun.com/j2se/1.4.2/docs/api/java/net/URLDecoder.html] -
Needed urgent help in converting to character
Hi All,
An advanced Happy New Year to all of you.
Now let me come to my doubt. My scenario is like this,I've got an internal table containing the field names
and the structure which has got that field and its vlues too. So i need to find the data type of these fields and then convert it to character and the fields are dynamic. So it would have been really good and kind of u all, if any of you could help me out with a common FM for conversion of all data types to char or with a sample code and its explanation.
****Points are for sure****
Thanks in advance..
Simy Abraham.Use Move Statement..
Example :
data : a(4) type n, " Numeric Variable
b(4) type c. " Character Variable
a = '1000'.
move a to b.
write b.
Reward if usefull...
Regards,
V.Balaji -
Using Escape character in UPDATE statement
SELECT REPLACE
( REPLACE
( REPLACE( REPLACE( REPLACE( REPLACE( BODY, '<STARTOFLINK>' )
, '<ENDOFLINK>' )
FROM ARTICLEI need to use the above in an UPDATE statement to remove some HTML tags from a CLOB column. However when I run the script it asks for the substitution variables for the '&' characters. I've tried "ESCAPE '\'" but I think you can only use that with a like operand.
Any suggestions?
Message was edited by:
Terrible
As you can see the HTML tags have been converted in this post!! I'm trying to remove:
& amp;
& quot;
& ndash;
& #039;This may help;
SQL> create table t (col1 varchar2(200))
Table created.
SQL> insert into t values('<STARTOFLINK>')
PL/SQL executed.
SQL> insert into t values('<ENDOFLINK>')
PL/SQL executed.
SQL> insert into t values(chr(38) || 'amp;')
PL/SQL executed.
SQL> insert into t values(chr(38) || 'quot;')
PL/SQL executed.
SQL> insert into t values(chr(38) || 'ndash;')
PL/SQL executed.
SQL> insert into t values(chr(38) || '#039;')
PL/SQL executed.
SQL> insert into t values('<STARTOFLINK>link<ENDOFLINK> '
|| ' AMP:' || chr(38) || 'amp;'
|| ' DQT:' || chr(38) || 'quot;'
|| ' DASH:'|| chr(38) || 'ndash;'
|| ' SQT:' || chr(38) || '#039;')
PL/SQL executed.
SQL> select * from t
col1
<STARTOFLINK>
<ENDOFLINK>
<STARTOFLINK>link<ENDOFLINK> AMP:& DQT:" DASH:– SQT:'
7 rows selected.
SQL> select regexp_replace(
regexp_replace(
regexp_replace(
regexp_replace(
regexp_replace(col1, '<.*OFLINK>',NULL),
chr(38) || 'amp;', chr(38)),
chr(38) || 'quot;', chr(34)),
chr(38) || 'ndash;', chr(45)),
chr(38) || '#039;', chr(39))
new_col from t
NEW_COL
AMP:& DQT:" DASH:- SQT:'
7 rows selected.Message was edited by:
MScallion
The SELECT * values were not as they are displayed due to HTML conversions. -
CONTAINS Operator using ESCAPE character
I must to do a SELECT sentence with a column with a domain index using CONTAINS. I need to look for a text that includes "%", but I want that the query recognizes it like literal and not like joker. I proved using the escape characters "\" and "{}", but I do not know if it does consider to the character "%" or if it uses it like comodín. The query is the next (if i need to find "6%"):
SELECT v.campo1, v.campo2
FROM promo_busqueda_leyes.s_version_xml v
WHERE contains (v.campo_xml, '(6\%)', 1)>0
or
SELECT v.campo1, v.campo2
FROM promo_busqueda_leyes.s_version_xml v
WHERE contains (v.campo_xml, '(6{%})', 1)>0
what am I making wrong?if i understood correctly, try like this....
use INSTR instead of CONTAINS ie
WHERE contains (v.campo_xml, '(6\%)', 1)>0WHERE INSTR (v.campo_xml, '(6\%)', 1)>0 -
Urgent Help Regarding Using Sound Files
Hello,
Using Java is it possible to
a) represent a .WAV file in WAVE FORM Format (Graph) output.i.e to represent a
audio file pictorially.
b) Spilit a .WAV file into n small pieces or portions.
Please guide me in this regard.Its Urgent
ThankzHello,
Using Java is it possible to
a) represent a .WAV file in WAVE FORM Format (Graph)
output.i.e to represent a
audio file pictorially.Open the AudioInputStream, read the AudioFormat, then read the frames one at a time and plot the data.
Here's some code that plays a wave file using the AudioInputStream. Java Sound, see reply 2. this shows how to open the file and get the format, it just plays it, but is able to plays it, but it does read frames. This should provide a start for you.
b) Spilit a .WAV file into n small pieces or portions.Yes, see the classes in package javax.sound.sampled.
>
>
Please guide me in this regard.Its UrgentDon't mark your posts as urgent, don't cross post.
ThankzYou're welcome, hope this helps -
Need urgent help to use or modify the "ultrasonic starter kit"
Hi, I am a french student, and I am working on an ultrasonic table with Labview 7.1.
On the one hand, I have done the control of the table that moves the "probe?", and on the other hand I have done the program that read the picture given by EPOCH (an ultrasonic system that detects interfaces into metals).
So, now my goal is now to mix them to make a map of those interfaces (one gives the position (x,y) of the probe and the other a graph with intensity peaks).
I have found the "ultrasonic starter kit", and I would like to modify it, but I need help to remove the part that simulates the graph of intensity in order to replace it with mine and to remove the part that simulates (x,y) position to replace it by my positions that are controled in the same order. (y decreases each time x>constant).
In case you would like to help me and need my work or a better description, please contact me to : [email protected]
François-Xavier MAYAUD.
Thank you.Hi,
I think it would be easier for you to start from a blank VI, than modifiying the example you found which is quite complex. Try to use an intensity graph with inputs as your data.
Regards,
ClémentG -
Help in using listagg function for more than 8000 char.
Hi Friends,
Need you urgent help in using listagg function for more than 8000 char.
I did the below sample SQL and in "e_orig" and "d_orig" for upto 4000 char it is working fine but I have to use it for more than 8000 char. and it is giving error,
I checked the listagg function is having limitation of 4000 char.
I tried but I am unable to achive this. Can someone provide me a sample example to achive this
select d.dname,d.loc,e.hiredate
,listagg(e.ename,',' ) within group (order by e.deptno) over (partition by e.deptno) as e_orig
,listagg(e.ename, ',') within group (order by e.sal) over (partition by e.deptno) as d_orig
from emp e, dept d
where e.deptno=d.deptno;[ This is my first post, I gone through the guideline for posting a post , and try to go according to that ( I have not pasted here create table and insert as I have used basic table emp, dept for example), please let me know if still I should give this, I will take care from my next post ]
Thanks in advanceInteresting, I didn't know you could do that, but...
BluShadow wrote:
You could write some PL/SQL code that does it all for you, but that would involve loops and would be slow.Well, objects are written in PL/SQL aren't they? And presumably there'll be implicit looping too? So it's not at all obvious that this method will be faster than doing the joining in PL/SQL in memory. The only way to find out is to benchmark them - so I have done that.
I noticed that OP's ref cursor actually only ever retrieves a single record for a bound department number, so I decided the best thing would be to test using a procedure that passes an output string back. I selected all (109) employees and put spaces in to ensure above 4000 characters. I also noticed that as he is using PL/SQL he probably can use a VARCHAR2 type, but just not ListAgg in the query, so I wrote short procedures as follows:
SimpleAggChr - bulk collect and array processing, VARCHAR2 output
ClobAggPrc - the custom aggregation method, CLOB output
SimpleAggClob - bulk collect and array processing, CLOB output
I then wrote a driving script that calls them in the order above and times each call (I like benchmarking so I have my own timing object to make it easy). I then print the lengths for checking, and my object writes the timings to my output table. Running a few times I got varying results, but generally it looks like there isn't a lot to choose between them for performance.
Here's the procedure code:
CREATE OR REPLACE TYPE char100_list_type AS TABLE OF VARCHAR2(100)
CREATE OR REPLACE PROCEDURE SimpleAggChr (x_out OUT VARCHAR2) IS
l_enames char100_list_type;
BEGIN
SELECT first_name || ' ' || last_name
BULK COLLECT INTO l_enames
FROM employees
ORDER BY salary;
FOR i IN 1..l_enames.COUNT LOOP
x_out := x_out || l_enames(i) || ',';
END LOOP;
END SimpleAggChr;
CREATE OR REPLACE PROCEDURE SimpleAggClob (x_out OUT CLOB) IS
l_enames char100_list_type;
BEGIN
SELECT first_name || ' ' || last_name
BULK COLLECT INTO l_enames
FROM employees
ORDER BY salary;
FOR i IN 1..l_enames.COUNT LOOP
x_out := x_out || l_enames(i) || ',';
END LOOP;
END SimpleAggClob;
SHO ERR
PROMPT ClobAggPrc
CREATE OR REPLACE PROCEDURE ClobAggPrc (x_out OUT CLOB) IS
BEGIN
SELECT clobagg(first_name || ' ' || last_name || ',')
INTO x_out
FROM employees
ORDER BY salary;
END ClobAggPrc;
SHO ERRand the driving script:
SET SERVEROUTPUT ON
SET TIMING ON
DECLARE
l_enames_c1 CLOB;
l_enames_c2 CLOB;
l_enames_v VARCHAR2(32767);
l_timer timer_set_type := timer_set_type ('Aggregation');
BEGIN
Utils.g_id := 'Aggregation';
SimpleAggChr (l_enames_v);
l_timer.Increment_Time ('SimpleAggChr');
ClobAggPrc (l_enames_c1);
l_timer.Increment_Time ('ClobAggPrc');
SimpleAggClob (l_enames_c2);
l_timer.Increment_Time ('SimpleAggClob');
DBMS_Output.Put_Line ('SimpleAggChr returned string of length ' || Length (l_enames_v));
DBMS_Output.Put_Line ('ClobAggPrc returned string of length ' || Length (l_enames_c1));
DBMS_Output.Put_Line ('SimpleAggClob returned string of length ' || Length (l_enames_c2));
l_timer.Write_Times;
END;
SET TIMING OFF
SET LINES 150
SET PAGES 1000
COLUMN id FORMAT A30
COLUMN line_text FORMAT A120
SELECT line_text
FROM output_log
WHERE id = 'Aggregation'
ORDER BY line_ind
/and the results:
SimpleAggChr returned string of length 5779
ClobAggPrc returned string of length 5779
SimpleAggClob returned string of length 5779
PL/SQL procedure successfully completed.
Elapsed: 00:00:27.05
LINE_TEXT
Timer Set: Aggregation, constructed at 03 Nov 2011 16:27:07, written at 16:27:35
================================================================================
[Timer timed: Elapsed (per call): 0.02 (0.000016), CPU (per call): 0.01 (0.000010), calls: 1000, '***' denotes corrected
line below]
Timer Elapsed CPU Calls Ela/Call CPU/Call
SimpleAggChr 9.84 0.36 1 9.84400 0.36000
ClobAggPrc 9.37 0.32 1 9.37400 0.32000
SimpleAggClob 8.25 0.22 1 8.25000 0.22000
(Other) 0.00 0.00 1 0.00000 0.00000
Total 27.47 0.90 4 6.86700 0.22500
13 rows selected. -
Urgent help needed for XML Tags using XMLForest()
Folks
I need some urgent help regarding getting use defined tag in your
XML output.
For this I am using XMLElement and XMLForest which seems to work fine
when used at the SQL prompt but when used in a procedure throws and error
SQL> Select SYS_XMLAGG(XMLElement("SDI",
XMLForest(sdi_num)))
From sdi
where sdi_num = 22261;- WORKS FINE
But when used in a procedure,doesnt seem to work
Declare
queryCtx DBMS_XMLQuery.ctxType;
v_xml VARCHAR2(32767);
v_xmlClob CLOB;
BEGIN
v_xml:='Select SYS_XMLAGG(XMLElement("SDI",
XMLFOREST(sdi_num)))
From sdi
where sdi_num = 22261';
queryCtx :=DBMS_XMLQuery.newContext(v_xml);
v_xmlClob :=DBMS_XMLQuery.getXML(queryCtx);
display_xml(v_xmlClob);
End;
CREATE OR REPLACE PROCEDURE display_xml(result IN OUT NOCOPY CLOB)
AS
xmlstr varchar2(32767);
line varchar2(2000);
BEGIN
xmlstr:=dbms_lob.SUBSTR(result,32767);
LOOP
EXIT WHEN xmlstr is null;
line :=substr(xmlstr,1,instr(xmlstr,chr(10))-1);
dbms_output.put_line('.'||line);
xmlstr := substr(xmlstr,instr(xmlstr,chr(10))+1);
END LOOP;
end;
SQL> /
.<?xml version = '1.0'?>
.<ERROR>oracle.xml.sql.OracleXMLSQLException: Character ')' is not allowed in an
XML tag name.</ERROR>
PL/SQL procedure successfully completed.
SQL>HELP is appreciated as to where I am going wrong?Hi,
if you want to transform something to something else, you should declare, what is your source.
I would prefer to use plain XSL-Transformations, because you have a lot more options to transform your source and you can even better determine, how your output should looks like.
Kind regards,
Hendrik -
Escape Character in ODBC Connections?? HELP!
Hi All,
I have a problem : we have a C++ app here that is supposed to attach to an Oracle 8i or 9i database here via a standard ODBC connection.
When this app attempts to do something like this:
INSERT INTO MyTable (MyRow) Values('[testing]')
it fails - it does not like the square brackets in the command. when I copy this into SQL Plus, of course, it runs just fine.
the ODBC link also doesn't like this:
INSERT INTO MyTable (MyRow) Values('/[testing/]') either
or this:
INSERT INTO MyTable (MyRow) Values('[[testing]]') either
or this:
INSERT INTO MyTable (MyRow) Values('`testing`') either
in fact, it appears the following are all reserved characters that oracle's ODBC driver can't handle:
` ' " \ / [ ]
My questions are :
1) Can I find a definitive list of these (Oracle documentation is good on reserved WORDS, but poor on reserved CHARACTERS)
2) what can I use to set an escape character within my ODBC SQL? Is this something I can tweak on the ODBC DSN cofiguration? I know in SQL*Plus you can just say
SET ESCAPE ON
SET ESCAPE "\"
But you can't do that on every SQL Query getting sent through ODBC can you?
Please help!
IThanks, but thats not really answering the two
questions I posed, is it? Well you are asking the wrong questions.
The quoted example was just
that, an example. The actual app is calling stored
procedures and not doing simple SQL statements. Using
bound variables is not really an option because the
number and type of parameters being sent down change
continually. This is no reason to not use bind variables. If you do not use bind variables and this is an OLTP database then scaling will not be an option for your application. It can also raise potential security holes due to SQL injection.
The site you quoted is to do with
obtaining recordsets back from stored procedures. We
do not need to obtain recordsets back from stored
procedures. Yes and it also shows how to bind input variables in ODBC calls, does the presence of record sets somehow render this invisible?
>
shall I repeat myself:-
My questions are :
1) Can I find a definitive list of these (Oracle
documentation is good on reserved WORDS, but poor on
reserved CHARACTERS)
As you can run the command in SQL*Plus it should indicate that it is not a reserved character as far as Oracle is concerned. Therefore looking in the Oracle documentation will not get you anywhere. You will need to refer to the documentation for your ODBC driver and the ODBC specification.
2) what can I use to set an escape character within
my ODBC SQL? Is this something I can tweak on the
ODBC DSN cofiguration? I know in SQL*Plus you can
just say
SET ESCAPE ON
SET ESCAPE "\"
I must admit I don't know. -
Can Anyone help to explain why character \ is used in Route pattern.
Can Anyone help to explain why character \ is used in Route pattern. also if you could explain *11\+1.289201XXXX ?
Well, I think the proper characterization would be that the design is based on a loose interpretation of RegEx. For instance, the asterisk "*" is typically used as the directive for zero or more occurrences of the preceding character. In the UCM dial plan, the * is a valid digit and someone decided to avoid the nastiness of escaping asterisk every time it is needed. On a related point, in standard regex build the "?" is used for a 0 or 1 match. In UCM, the "?" is 0 or more (so, it is like the asterisk in that way).
That said, I get your point. Someone says "hey, we need wild cards" and the likely place to start pulling examples is RegEx.
HTH
-Bill
(b) http://ucguerrilla.com
(t) @ucguerrilla
Please remember to rate helpful responses and identify helpful or correct answers. -
Urgent help needed! How do I use Time Machine to restore my System disc?
I need urgent help. First I discovered that my Library folder was empty. When I tried to restore the library to an earlier version via Timemachine it would not let me because it said the system was in use. Trying to start-up from another system on another internal drive and using various disc repairs resulted in the whole volume to disappear.
Question is how do I get the earlier system from my Timemachine backup drive? I have another Mac where I can attach the TIme machine HD to. Can I restore it from there and then copy the files over to my corrupted disc? All my programs are on there as well, which would take me days to re-install and then there are the other bits, emails, photos etc. Can anyone help?lightandmagic wrote:
Thanks for your sympathy Pondini and the encouragement. You just reminded me that I will lose a whole working day restoring !!! Do you happen to know where the emails are kept on the system and the address book? I better nick those as well as my other life sustaining bits before its too late. I don't trust anything any more.
I don't know what you mean by "nick those." Time Machine will put everything back the way it was at the time of the backup (unless you'd excluded things).
Do you mean you want to restore things from the period after the backup you selected?
For Address Book or Apple Mail, start the application, then +Enter Time Machine,+ navigate to your latest backup, and you'll have a prompt to restore. For Mail, you can restore an entire mailbox. When you exit from TM, you'll see a new folder in your Mail sidebar with the restored items, so you can sift through them and move, delete, or leave them as you wish.
Other items, you'll have to locate and restore via the Finder > Time Machine.
Maybe you are looking for
-
Hi I have the orginal iPad ,,,and had software updates done on both iPhone & iPad ,one thing I noticed everytime I hook my iPad & iPhone up to iTunes update software or upgrades I seem to loose very important emails from both iPhone & iPad ,,,so that
-
IPad to TV via wifi or bluetooth
What are the options for streaming stuff from my iPad-mini to my television's HDMI input? I am aware do - but know nothing about - Apple TV. Is that the only way or are there third part options? Thanks
-
ALV Grid Insert Line - Dumps only on certain computers
We have some ALV Grids in our program. Every time i open one my computer the first cell is marked, so the insert line function just adds another line. But on an other computer, the frist cell is somehow not marked, which leads to a dump on inserting
-
Can't connect to Express Edition 11g by sql developer
hello, i installed the 11g edition and try to connect to it by sql developer. it didn't work, then I noticed there was an older version (10g) on the laptop. So i removed both, and installed the 11g version, but still it doesn't work. My laptop runs o
-
_tmp files in windows environment
Hi I am having some problem with these ._tmp.jpg files that my mac generates while i am working in Photoshop with JPG files. Mac saves another small temp file when i save it to the network /windows/ i have to run a batch on windows platform, but the