SQL & PL/SQL :: Escape Character Meaning

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


ADVERTISEMENT

SQL & PL/SQL :: Escape Character In Query

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

SQL & PL/SQL :: Escape Character For Single Quote?

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

SQL & PL/SQL :: Using Escape Character In Dynamic Query?

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

SQL & PL/SQL :: Escape Special Character Word

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

Export Data Using Escape Character

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

Server Utilities :: How To Use Escape Character For Loading Data Via Sql Loader

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

Server Utilities :: Escape Character For Loading Data Via Sql Loader

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

Server Administration :: How To Know Character Set As Single Character Or Multi Character

Sep 26, 2013

how do we know database character set is either single character set or multi character set?

While changing character-set from AL32UTF8 to WE8MSWIN1252 got "ORA-12712: new character set must be a superset of old character set".

Below are steps taken to resolve the issue -

ALTER DATABASE CHARACTER SET WE8MSWIN1252;

i got this error: ORA-12712: new character set must be a superset of old character set

below are the commands executed by me:

SQL> SHUTDOWN IMMEDIATE;
SQL> CONNECT SYS/password AS SYSDBA;
SQL> STARTUP MOUNT;
SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;
SQL> ALTER DATABASE OPEN;
SQL> ALTER DATABASE CHARACTER SET INTERNAL_USE WE8MSWIN1252;
SQL> SHUTDOWN;
SQL> STARTUP;
SQL> QUIT;

And its working...

I have not done it in proper order. Neither have done ccsscan. Still, no user reported any issues. Do my changes truncated the data?

View 11 Replies View Related

Meaning Of Sentence SRW.USER_EXIT?

Apr 9, 2013

I am developing in the Report tool.I wonder what the meaning of the sentence SRW.USER_EXIT, and arguments that are used in it.

For example,

srw.user_exit('FND FLEXIDVAL
CODE=" "
NUM=" "
APPL_SHORT_NAME=" "
DATA=" "
VALUE=" "
DISPLAY=" "
DISPLAY=" "
IDISPLAY=" "
IDISPLAY=" "');
return();

View 2 Replies View Related

Forms :: Meaning Of System Message_level

Jul 3, 2010

what is mean by system.message_level..

View 2 Replies View Related

SQL & PL/SQL :: Meaning Of Partition By Null In Analytic Functions

Aug 18, 2013

What's the meaning of "partition by null" in analytic functions like

select emp_no, dept_nm, count(*) over(partition by null) cnt
from some_table

is it right there is no partition?

View 1 Replies View Related

Replication :: Meaning Of BOUNDED RECOVERY In Golden Gate

Jan 8, 2012

whats the meaning of BOUNDED RECOVERY in golden gate. I just know RECOVERY in oracle.. What is the difference when you say BOUNDED RECOVERY.

View 1 Replies View Related

Networking And Gateways :: What Is Meaning For Port Number In Listener.ora File

Aug 12, 2013

what is meaning for port number,in listener.ora file associated with ? is there any difference for port number in windows & in linux server.,?

View 3 Replies View Related

Meaning Of Lines CPU Cores And 99th Percentile In Average Active Session

Apr 18, 2013

I´m monitoring a 11g database with OEM. I have a couple of questions regarding the Average Active Sessions chart:

- What does the line 'CPU core' means? The DB is running in a virtual server with 8 CPUs. However, the line 'CPU core' is in 1. Does it mean that Oracle is just using 1 CPU?
- What represents the '99th percentile' line? The chart shows several sessions above that line, something is not working well, isn't it?

View 4 Replies View Related

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 View Related

SQL & PL/SQL :: Escape Sequence Didn't Work

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

PL/SQL :: Escape HTML Content Without Escaping Tags

Jul 4, 2013

How can I escape HTML content without escaping the HTML tags?

View 4 Replies View Related

SQL & PL/SQL :: How To Escape Comma While Exporting Data From Table Into CSV File

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

Client Tools :: Escape / Quote Ampersand (&) Because No Variable Substitution

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

SQL & PL/SQL :: How To Insert Special Character / ORA-00911 / Invalid Character

May 25, 2010

We have Oracle 10g and user trying to Insert following in one of our table field and getting error:

'REVOLUCIÃ"N Historical Corruptions Agenda'

Getting follwoing error:

ORA-00911: invalid character
create table Employee
(Emp_ID Varchar2 (10),
Company_Name Varchar2 (40)
)
Insert into Employee
values ('Emp1', 'REVOLUCIÃ"N Historical Corruptions Agenda');

View 5 Replies View Related

Inserting Character From Extended ASCII Character Set?

Mar 8, 2007

I'm trying to insert a character from the extended ascii character set. Specifically, there's a company that has an accented e (�) in the name. Right now, the company name doesn't have the e at all, accent or no accent. So I'm trying to do an update, something like

update table1 set company_name='blah�" where company='blah'

It runs, but doesn't do the update. Even when I try to forcefully do an insert (instead of an update) I get nowhere; the accented is simply dropped. So the basic question is, how do you insert extended ascii characters into oracle?

View 3 Replies View Related

PL/SQL :: How To Select String Between Nth Specific Character To Nth+1 Character

Aug 9, 2012

I have one string 'SWAP_20120224_MEGAMART_MAR_Sales.csv'

I want to get the string between second underscore and third underscore i.e. 'MEGAMART'

How to achieve this in sql statement?

View 4 Replies View Related

Globalization :: Character Encoding - LATIN-1 Character In UTF-8 DB?

Feb 9, 2013

I am using C++ OCI LIB, to insert some report data from remote OCI client to oracle 11 server. This data is read by another process to create the report.The DB CHARSET is UTF-8. But the report tool expects the data to be ISO08859-1 encoded. So while inserting the data into the database i specify the following LANG and CHARSET for my table colulmn in client:

The TARGET DB CHARSET is UTF-8
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
size_t csid = 871; // UTF-8
OCIAtrSet((void *) bnd1p, (ub4) OCI_HTYPE_BIND,
*(void *)&csid*,
(ub4) 0,
(ub4)OCI_ATTR_CHARSET_ID, errhp);

This solution works for almost every case of ASCII and Extended ASCII Charest but we are facing issues if we have few specific characters to be inserted.f we are trying to insert single beta character [β] through client, the data goes empty to the column.

Beta Character details:
DEC     OCT     HEX     BIN     Symbol           Description
223     337     DF     11011111     ß     Latin small letter sharp s - ess-zed

DB Output after insert single β:
select rawtohex(NAME) from PERSONS where EID=333;

RAWTOHEX(NAME)
---------------------------

But if the string is *"ββ"* everything work fine:
DB Output for "ββ":
select rawtohex(NAME) from PERSONS where EID=333;

RAWTOHEX(NAME)
---------------------------
DFDF

View 6 Replies View Related

SQL & PL/SQL :: Way To Specify Character Set Which Should Be Used?

Apr 27, 2010

If using utl_file package to write output to a file, is there a way to specify the character set which should be used?

View 1 Replies View Related

30 Character Limit?

Nov 13, 2007

I've written a .net program for inserting blobs into our database, and it works fine, except if the path has more than 30(+) characters. I've read that this is a limitation in oracle, but the actual contents being stored is just the filename, extension, and blob itself, so I'm not actually storing anything more than 30 characters.

View 4 Replies View Related

Character Encoding In 10g?

Dec 7, 2010

The problem is regarding character encoding.When i am entering Japanese characters in a description form field in a Jsp page and on submit storing the value in the database,its getting stored fine.When i an selecting the value and showing in the result page,then again its properly displaying.But when i am executing the select query in Sql Developer,the values are most probably showing as unicode characters (i am not sure about this though,but at least they are looking like unsupported characters).

Is there any way to store data,such as the select query will also show understandable japanese characters on Sql Developer(or other IDEs)?

i am using Oracle 10g?

View 2 Replies View Related

SQL & PL/SQL :: Sum Of Character Column

Mar 5, 2010

There is a table like below

seq no. number(6)
amount varchar2(20,2)

The values in the table are:

Rec1
123456
100.00

Rec2
123457
99.01

Rec3
123458
9a.01

Rec4
123459
NULL

Now I want to summarize the amount column replacing non numeric and null values to '0'(zero's).

how to frame query for this.

View 2 Replies View Related

SQL & PL/SQL :: Using Character Functions?

May 13, 2010

I would like to use character functions (LPAD, INSTR, SUBSTR, etc) to accomplish what i feel should be rather easy. I would like to take the following character strings:

'ADAM ST #3 S_109640'
'ALBANY AVE #5 & #6 S_AL5&6'
'ALBIN RD #10A S_123318'

And make them

'ADAM ST'
'ALBANY AVE'
'ALBIN RD'

As you can see, it probably boils down to using SUBSTR, INSTR, RTRIM, and LENGTH??

View 10 Replies View Related

SQL & PL/SQL :: Character Change

Jun 25, 2010

I have a table in that table ename column the data type is VARCHAR2(40).

In that column the name is like kumar's and Caño

I have created text file using spool it's showing like

Reño kumar¿s

Why only for kumar's it's showing like "¿" this.

View 36 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved