SQL & PL/SQL :: Escape Operator Symbol?
Feb 28, 2011
1) Can we set a different symbol other than '' for escape operator.
2) If yes, how to see the current escape operator symbol.
3) How to find out the below name with escape operator?
Employee name ----> rama_krishna_raj
View 2 Replies
ADVERTISEMENT
Jun 19, 2011
Currently , my system using , as digit grouping symbol and . as decimal symbol in Oracle forms and report. Is there any way to reverse that to the whole system?
View 3 Replies
View Related
Jul 6, 2010
i want to understand each and every concept of oracle.in this book they explained about escape character, but stiil i cant get it..i want to understand why used escape character in 2nd query and whats its effects...
1. SQL> SELECT first_name, last_name
FROM employees
WHERE first_name LIKE 'Su%'
AND last_name NOT LIKE 'S%';
2. SELECT job_id, job_title
FROM jobs
WHERE job_id like 'AC\_%' ESCAPE '';
View 9 Replies
View Related
Jul 11, 2013
I am creating a dynamic sql and to do so I want to concat this string:
v_consulta := v_listado_condiciones || 'UPPER(nombre) like UPPER(''/%'' '|| PRAZONSOCIAL ||' ''/%'') escape ''/'' '
But I get errors when I try to escape % operator, how could I do that ?
View 9 Replies
View Related
May 6, 2011
I have a simple update statement. Sometimes the data in this statement has single quotes in it (like shown below).
Update table1 set account = 'CD'S NOT MINE' WHERE NUMBER = '0027201'
When I run this SQL, I get SQL Error: ORA-01756: quoted string not properly terminated
01756. 00000 - "quoted string not properly terminated"
Is there an escape charecter that I can use?
View 9 Replies
View Related
Aug 28, 2012
I'm trying to replace the variable value v_tblname in dynamic SQL. But not able to escape the single quotes character.
DECLARE
v_sqlcols VARCHAR2(2000);
v_sqlcols1 VARCHAR2(2000);
v_tblname VARCHAR2(50) := 'DEPT';
BEGIN
v_sqlcols := q'[SELECT LISTAGG(COL,',' ||CHR(10)) WITHIN GROUP (ORDER BY COL)
FROM (
[code]....
View 5 Replies
View Related
Jan 7, 2011
E1 Table Data
Job_id
Sa_Clerk
Sa_Manager
Sahil
select job_id from E1 where instr(job_id,'_')>0;
returns output
Sa_Clerk
Sa_Manager
same as
select job_id from E1 where job_id like 'Sa_\%' escape '';
resturns
Sa_Clerk
Sa_Manager
Same Result , Then What is exact need of Escape
View 4 Replies
View Related
Jul 2, 2012
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
View 3 Replies
View Related
Dec 30, 2011
I'd like to use escape sequences in plsql but it didn't work.I have to use a variable 'v_jahr'..This is what I like to do:
SELECT COUNT(TABLE_NAME) FROM USER_TABLES
WHERE TABLE_NAME = 'TABLE' || v_jahr;
But I think I should use an 'EXECUTE IMMEDIATE' like this:
EXECUTE IMMEDIATE 'SELECT COUNT(TABLE_NAME) FROM USER_TABLES
WHERE TABLE_NAME = 'TABLE' || v_jahr';
But then I have to escape my tics. How can I do this?
I tried this:
EXECUTE IMMEDIATE 'SELECT COUNT(TABLE_NAME) FROM USER_TABLES
WHERE TABLE_NAME = '||''''||'TABELLE_'||'''' || v_jahr ||'''';
View 3 Replies
View Related
Jul 4, 2013
How can I escape HTML content without escaping the HTML tags?
View 4 Replies
View Related
Apr 9, 2012
How we can escape comma while exporting data from table into csv file.
CREATE TABLE emp
(
EMPNO NUMBER(4) NOT NULL,
ENAME VARCHAR2(10 BYTE),
JOB VARCHAR2(9 BYTE),
MGR NUMBER(4),
HIREDATE DATE,
address varchar2(100),
[code].......
i have to export data from emp table which has address column and address column contain comma, when i am running below script, the comma part in address field comes in next tab in csv file, is there any way we can avoid shifting to next tab and can have complete address in one tab.
set echo off
set verify off
set termout on
set heading off
set pages 50000
[code]....
View 9 Replies
View Related
Mar 7, 2012
I have to load a fixed width file using sql loader utility. But the records have multiple special characters. writing / modifying the loader utility to load the data.
--Script to create the table
create table t1 (
ip1 varchar2(2),
ip2 number,
ip3 number);
--loader utility
LOAD DATA
INFILE 'c:inputfile.dat'
BADFILE 'c:adfile.bad'
REPLACE
INTO TABLE t1
FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '°'
(
ip1POSITION(1:2) CHAR,
ip2POSITION(3:17) INTEGER EXTERNAL ":ip2/100",
ip3POSITION(18:32) INTEGER EXTERNAL ":ip3/100",
)
--data file
9900000000000000000000059762160°
9900009694635473¶00009693856712-
99000024383898654000025664467904
--sql version i am using
SQL*Loader: Release 9.2.0.1.0 - Production on Wed Mar 7 18:32:33 2012
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
In the above mentioned data file, records has multiple special characters like '°','¶' ,'-'.
All these special characters have some meaning.
eg: '°' specifies the above column needs to be multiplied by -1
'¶' specifies the above column needs to be multiplied by -0.1
what changes need to be made in loader utility for the same? Also, will there be any change in the utility if I am using higher version of oracle?
View 13 Replies
View Related
Dec 1, 2006
I have a text file which is comma separated with values enclosed in double quotes.
In my text file which I have to load into database, one of the field have the value like
Your "offspring"
When I run my normal sqlloader ctl file, it gives the error as
Record 304: Rejected - Error on table BUYER, column BUYERS_NAME.
no terminator found after TERMINATED and ENCLOSED field
Is there any way I can use some escape character for loading this type of data.
View 16 Replies
View Related
Apr 5, 2011
I wish to replace the string "Benutzername&Kontakt" with nothing.
SELECT REPLACE (role_owner, 'Benutzername&Kontakt', '')
FROM JC_NAME_62
WHERE jc_name LIKE 'SAP_R4_BIN5\_%' ESCAPE ''
But my Toad prompts me always to fill in the variable. I don't wish to do that, I wish to escape the &
View 5 Replies
View Related
Jul 12, 2013
I need to get create_user_id for different sale_location_id.Also create_user_id field will be having different values.This is part of my big query.I need to add this stmt in that.So taken that part and figuring it out.
create table it(sale_location_id number,create_user_id varchar2(10));
table IT created.
insert into it values(1,'ISRA')
1 rows inserted.
insert into it values(2,'USFA')
1 rows inserted.
select a.sale_location_id,decode(a.sale_location_id,1,a.create_user_id like 'IS%',a.create_user_id like 'U%') create_user_id from it a
given error as:
ORA-00907: missing right parenthesis 00907. 00000 - "missing right parenthesis"
How to write this.
View 5 Replies
View Related
Sep 16, 2010
I have a table in SQL , I am creating a column Of name in it , i want to restrict user to enter name in Capital only ,and i want to create this at table level . I tried Check Operator but failed .
create table my_tab
(U_name varchar2(30) ,
constraint ck_check (U_name = upper(m_name))
/
View 6 Replies
View Related
Mar 15, 2013
Any alternate to the following query.
select * from emp where ename like upper(NVL('%mi%',ename));
Basically I want to search based on string or null.
View 11 Replies
View Related
Jun 28, 2010
I have an query i.e.
I want 3 lines input in 1 line using 2 union operator like
Input:-
'i love playing
football and
volleyball'
i want the output like:-
"i love playing football and volleyball"
solve query using 2 union operator?
View 9 Replies
View Related
Oct 26, 2011
I have come across a join in a query which has the (+) symbol at the end of it.
View 3 Replies
View Related
May 27, 2011
i am getting error for this code
CREATE OR REPLACE FUNCTION "ABS"."PROCESS_YEAR"(processYear DATE) RETURN NUMBER DETERMINISTIC IS
year NUMBER:=NULL
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
* & = - + ; < / > at in is mod remainder not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
LIKE4_ LIKEC_ between || multiset member SUBMULTISET_
View 3 Replies
View Related
Feb 12, 2013
I have a two tables with same column name , I wanted to find different record in table1 when compared with table2
create table table1(col1 number,col2 number,col3 number,col4 number,col5 number);
create table table2(col1 number,col2 number,col3 number,col4 number,col5 number);
insert into table1 values(1,2,NULL,NULL,NULL);
insert into table2 values(1,2,NULL,NULL,NULL);
commit;
select col1 from (select col1,col2,col3,col4,col5 from table1 minus select col1,col2,col3,col4,col5 from table2);
no rows selected
how come i get no rows selected when col3,col4,col5 is having null values but NULL could be anything so
NULL-NULL cannot be equal to zero how is it possible
View 3 Replies
View Related
Jan 19, 2013
i want to know that how can i use like operator with if condition. i m using oracle10g form builder and it's for search purpose .
for example ...
if search string=string2 then
message('Record found');
end if ;
i want to use like '%search string%'.
View 1 Replies
View Related
Jan 10, 2012
what the difference between IN and EXISTS operator. Why should we use EXISTS operator?
View 1 Replies
View Related
Sep 7, 2011
I have a issue on running the query with quote operator . When I am executing the SQL query I am getting error "Quoted String not properly Ended".
select q'[Oracle's world ]'
from dual
But The following query works.
select q'[It's Oracle's world ]'
from dual
View 4 Replies
View Related
Feb 18, 2013
I have a requirement in SQL that I have to number each row. Hence I thought of using ROWNUM. But the sql query I'm using uses UNION operator. Hence I used like this
select a,b,rownum as 'field1' from table1
union
select c,d,1 as 'field1' from table2
Will the above query solve my purpose?
View 11 Replies
View Related
Mar 15, 2009
I want a query to get the column data , which consists of % symbol ,using like .
Sample :
The varchar data type column consit of columns 100%,100 ,90% ,77% with the Query i have to get the rows as 100%,90% ,77%. (i can get the data using in operator but i want to know how to get that using like).
View 1 Replies
View Related
Nov 23, 2012
I am using the following query to trim the white space and enter character in the given string. BUt it is trimming the euro symbol also.
SQL> select regexp_replace(i_ruleexpression, '([^[:graph:]|^[:blank:]])','') into i_ruleexpression from dual ;
i_ruleexpression: Item.addChildByName("Advantage Smart 75 (-15€)")
View 11 Replies
View Related
Apr 8, 2013
I want to display currency Rupee(Indian Currency) symbol in salary.
I am getting only $ symbol.
how to do it.
tell the process.
View 2 Replies
View Related
Jun 7, 2011
I am trying to schedule a DBMA_JOB and getting the below mentioned error.
JOB:
====
declare
VARIABLE v_jobnum NUMBER;
begin
DBMS_JOB.SUBMIT(job => v_jobnum,
what => 'dbms_refresh.refresh(""CLARITY"."M_MV_INBASKET_ANALYSIS"");',
next_date => to_date("05-07-2011 13:45","DD-MM-YYYY HH24:MI"),
interval => '(ADD_MONTHS(TRUNC(SYSDATE,"MM")+4,1)+13.75/24)');
end;
[code]....
View 20 Replies
View Related
May 18, 2010
when creating this,
create or replace package body test as
employees emp_tab := emp_tab();
procedure test1 as
g_ref sys_REFCURSOR;
BEGIN
employees.EXTEND(2);
employees(1) := emp_type (1, 'name1');
employees(2) := emp_type (2, 'name2');
OPEN g_ref FOR
SELECT * FROM TABLE (CAST (employees AS emp_tab));
END test1;
I got a error ERROR at line 11: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
begin end function package pragma procedure form
1. create or replace package body test as
2. employees emp_tab := emp_tab();
3. procedure test1 as
View 1 Replies
View Related