How to Escape Characters in Oracle PL/SQL Queries Kaip Escape Žmonės Oracle PL / SQL užklausų

Oracle databases reserve some special characters with specific meaning and purpose within Oracle environment. Oracle duomenų bazės rezervą tam tikrų specialių simbolių, turinčių specifinę reikšmę ir paskirtį aplinkos Oracle. These reserved characters include _ (underscore) wild card character which used to match exactly one character, % (percentage) which used to match zero or more occurrences of any characters and ' (apostrophe or quotation mark) which used to mark the value supplied. Šie saugomos simbolių įtraukti _ (pabrėžti) laukinių kortelė simbolių, kurie naudojami palyginimui tiksliai vienas ženklas,% (procentais), kurie naudojami palyginimui nulį ar daugiau įvykių, bet simbolių ir "(kabutes ar kabutės), kuris naudojamas ženklo vertė pateikta. These special characters will not be interpreted literally when building SQL query in Oracle, and may caused error in results returned especially when performing string search with LIKE keyword. Šie specialūs simboliai nebus aiškinama pažodžiui, kai statybos SQL užklausą į "Oracle", ir gali sukelti klaidos rezultatus, ypač atliekant string paieška PANAŠUS raktažodžiu. To use these characters so that Oracle can interpret them literally as a part of string value instead of preset mean, escape character has to be assigned. Norėdami naudoti šiuos simbolius, kad "Oracle" gali interpretuoti juos pažodžiui kaip dalis eilutės reikšmė, o ne iš anksto reiškia, gelbėjimosi pobūdį, turi būti priskirtos.

Oracle allows the assignment of special escape characters to the reserved characters in Oracle can be escaped to normal characters that is interpreted literally, by using ESCAPE keyword. Oracle leidžia priskyrimo specialiųjų pabėgti simbolių rezervuoti simboliai ir "Oracle" galima pabėgo į normalius pavadinimus, kad būtų aiškinama pažodžiui, naudojant ESCAPE raktažodžiu.

For example, to select the name of guests with _ (underscore) in it, use the following statement: Pavyzdžiui, norėdami pasirinkti pavadinimą svečiams su _ (pabraukimo) į jį, naudokite tokį pareiškimą:

SELECT guest_name FROM guest_table WHERE name LIKE '%\_%' ESCAPE '\'; PASIRINKITE guest_name IŠ guest_table KUR vardas LIKE '% \ _% "ESCAPE" \ ";

Without specifying the \ (backslash) as escape clause, the query will return all guest names, making the unwanted results problem. Nenurodant \ (backslash) su išlyga, kad prašymas bus grąžinti visus svečių pavadinimų, todėl nepageidaujamas rezultatus problema.

The above syntax will not work on ' (quote). Pirmiau sintaksė nebus darbo "(citata). To escape this quotation mark and to display the quote literally in string, insert another quote (total 2 quotes) for every quote that want to be displayed. Norėdami išvengti šios kabutės ir parodyti citata pažodžiui į eilutę, įterpti kitą citata (iš viso 2 kabučių) į kiekvieną pasiūlymą, kad nori būti rodomas. For example: Pavyzdžiui:

SELECT 'This will display line with quote''s word.' PASIRINKITE "Tai bus rodomas atitinka quote' žodis". FROM temp_table; IŠ temp_table;
SELECT 'This will display ””double quoted”” word.' PASIRINKITE "Tai bus rodomas" dvigubo cituojamą "žodis". FROM temp_table; IŠ temp_table;

will return the following respectively: sugrįš taip atitinkamai:

This will display line with quote's word. Rodomas liniją su citata žodis.
This will display ”double quoted” word. Tai bus rodomas "dvigubo cituojamą" žodis.

IMPORTANT : The page is machine translated and provided "as is" without warranty. DĖMESIO: Šis puslapis yra mašina išvertė ir pateikiama "kaip yra" be garantijų. Machine translation may be difficult to understand. Mašininio vertimo, gali būti sunku suprasti. Please refer to Remkitės original English article originalas anglų straipsnis whenever possible. jei įmanoma.


3 Responses to “How to Escape Characters in Oracle PL/SQL Queries” 3 atsakymai į "Kaip Escape Žmonės Oracle PL / SQL užklausų"

  1. Charles Asbornsen Charles Asbornsen
    September 26th, 2008 00:28 Rugsėjis 26, 2008 00:28
    3 3

    Thank you very much – I'ma SQL Server gent with an Oracle source and I was going nuts! Thank you very much - Aš SQL Server džentelmenas su Oracle šaltinis ir aš vyko riešutų! :)

  2. sam33 sam33
    September 17th, 2008 20:44 Rugsėjis 17, 2008 20:44
    2 2

    salut j'ai le mm pb ! salut j'ai le mm pb! si je fait une recherche sur le '_' seul sa marche mais si v je chercher des mots avec le '_' si je fait une recherche sur le "_" seul sa marche mais si prieš je chercher des mots avec le "_"
    exmple: exmple:
    SELECT * from Test WHERE nom LIKE '1%\_%test' ESCAPE '\'; SELECT * nuo bandymų KUR nom PANAŠUS 1% \ _% bandymo "ESCAPE" \ ";
    sa me renvoie : sa man renvoie:
    1_test 1_test
    10_test ?? 10_test?
    or que normalement sa devait rendre que: arba que Normalement sa devait rendre que:
    1_test ?? 1_test?
    je comprend pas je comprend pas

  3. Escape Character in MySql - Discussweb IT Community - Web Development, Software Programming, SEO, Quality Assurance, 3D, Web Hosting and more... Escape Character in MySql - Discussweb IT Bendrijos - Web programavimas, programinė įranga, optimizavimo, kokybės užtikrinimo, 3D, Hostingas ir daugiau ...
    July 13th, 2007 19:27 13 liepa 2007 19:27
    1 1

    [...] about Escape Characters. [...] Apie Escape simbolių. Escape Characters Oracle Wildcards Wildcard Characters Escape Character How to Escape Characters in Oracle PL/SQL Queries Escape ženklai Oracle Pakaitos simboliai Escape Rašmenų Kaip Escape Žmonės Oracle PL / SQL užklausų

Leave a Reply Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Galite naudoti šias žymeles: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Subscribe to comments funkcija buvo išjungta. To receive notification of latest comments posted, subscribe to Norėdami gauti pranešimus apie naujausius komentarų, užsiprenumeruoti My Digital Life Comments RSS feed Mano skaitmeninis gyvenimas Komentarų RSS or arba register to receive registruotis, norint gauti new comments in daily email digest. Nauji komentarai kasdien elektroniniu paštu.
Custom Search

New Articles Nauji straipsniai

Incoming Search Terms for the Article Pradedantys Paieška Sąlygos straipsnį

oracle escape character orakulas pabėgti pobūdis - -- oracle escape orakulas pabėgti - -- pl sql escape character pl sql pabėgti pobūdis - -- oracle escape & orakulas pabėgti & - -- escape character in oracle pabėgti savybių orakulas - -- sql escape sql pabėgti - -- oracle escape apostrophe orakulas pabėgti kabutes - -- oracle sql escape orakulas sql pabėgti - -- sql escape character sql pabėgti pobūdis - -- escape oracle pabėgti orakulas - -- oracle sql escape character orakulas sql pabėgti pobūdis - -- oracle sql & character orakulas sql & pobūdis - -- sql escape & sql pabėgti & - -- oracle escape characters orakulas pabėgti simbolių - -- Escape in Oracle Escape į Oracle - -- sql escape apostrophe sql pabėgti kabutes - -- oracle escape string orakulas pabėgti Styga - -- Oracle apostrophe escape Oracle kabutes pabėgti - -- oracle & escape character orakulas ir evakuacijos pobūdis - -- pl/sql escape lt / sql pabėgti - -- oracle sql escape & orakulas sql pabėgti & - -- sql escape ' sql pabėgti " - -- escape character oracle pabėgti pobūdžio orakulas - -- pl/sql escape character lt / sql pabėgti pobūdis - -- pl sql escape pl sql pabėgti - -- escape characters in oracle pabėgti simbolių orakulas - -- escape character in PL SQL pabėgti pobūdžio PL SQL - -- Oracle like escape Oracle, kaip išvengti - -- oracle escape ' orakulas pabėgti " - -- escape sql pabėgti sql - -- pl/sql+set escape+& lt / sql + nustatymas evakuacijos + & - -- oracle escape syntax orakulas pabėgti sintaksė - -- escape & in sql pabėgti & SQL - -- oracle escape quote orakulas pabėgti citata - -- special characters in oracle specialiuosius simbolius orakulas - -- oracle string escape character orakulas string pabėgti pobūdis - -- oracle escaping & orakulas pabėgusi & - -- oracle quote escape orakulas citata pabėgti - -- escape character in PL/SQL pabėgti savybių PL / SQL, - -- escape sequence in oracle evakuacijos tvarka orakulas - -- oracle pl sql escape character Oracle PL sql pabėgti pobūdis - -- pl sql wildcard escape pl sql wieloznaczny pabėgti - -- pl/sql escape characters lt / sql pabėgti simbolių - -- ESCAPE in oracle query ESCAPE į orakulas užklausą - -- how to escape & in oracle kaip ištrūkti ir į orakulas - -- plsql escape plsql pabėgti - -- ESCAPE SEQUENCES IN ORACLE ESCAPE sekas ORACLE - -- escape & oracle pabėgti & orakulas - -- how to use escape character in oracle kaip naudotis gelbėjimosi savybių orakulas - -- oracle sql escape sequence orakulas sql pabėgti seka - --