Insert Text Literal and Concatenation in Oracle SQL Tekst invoegen letterlijke en concatenatie in Oracle SQL

In Oracle, it’s possible to insert literal or concatenate 2 or more charater strings or SQL result output together. In Oracle, is het mogelijk in te voegen of letterlijke aaneenschakelen 2 of meer charater strings of SQL resultaat output samen. This manipulation allows you to manipulate the format of data returned by SQL query. Deze manipulatie kun je manipuleren van de vorm van de gegevens teruggegeven door SQL-query.

Two solid vertical bar || operator is used to concatenate 2 or more strings. Twee solide verticale balk | | exploitant wordt gebruikt voor het aaneenschakelen 2 of meer strijkers. Beside, Oracle also provides the CONCAT character function as an alternative to the vertical bar operator just in case there is situation where it is difficult or impossible to control translation performed by operating system or network utilities. Naast Oracle heeft ook nog de functie concat karakter als een alternatief voor de verticale balk exploitant voor het geval er situatie waarin het moeilijk of onmogelijk is om de vertaling uitgevoerd door het besturingssysteem of netwerk nutsbedrijven. This function should be used in applications that will be moved between environments with differing character sets. Deze functie moet worden gebruikt in toepassingen die zullen worden verplaatst tussen omgevingen met verschillende tekensets.

Oracle will automatically casts values into types which can be concatenated. Oracle zal automatisch afgietsels waarden in typen die kunnen worden samengevoegd. As Oracle interprets NULL as the empty (zero-length) character string, it doesn’t return NULL if an operand is NULL, meaning concatenating a zero-length character string with another operand always results in the other operand, so null can result only from the concatenation of two null strings. Zoals Oracle interpreteert NULL als de lege (nul-lengte) tekenreeks, maar niet terugkeren NULL als een operand is NULL, een zin concatenating nul-lengte karakter string met een andere operand altijd de resultaten van de andere operand, dus nietig kan alleen het gevolg zijn van de concatenatie van twee null strings. To concatenate an expression that might be null, use the NVL function to explicitly convert the expression to a zero-length string. Om aaneenschakelen een uitdrukking die zou kunnen worden nietig, gebruikt u de NVL functie om de expressie expliciet converteren naar een zero-length string.

Concatenating two strings results in another character string. Concatenating twee strings resultaten in een andere tekenreeks. If both character strings are of datatype CHAR, the result has datatype CHAR and is limited to 2000 characters. Als beide karakterstrings zijn van datatype CHAR, het resultaat is datatype CHAR en is beperkt tot 2000 tekens. If either string is of datatype VARCHAR2, the result has datatype VARCHAR2 and is limited to 4000 characters. Indien een string is van het datatype VARCHAR2, het resultaat is datatype VARCHAR2 en is beperkt tot 4000 tekens. Trailing blanks in character strings are preserved by concatenation, regardless of the strings’ datatypes. Trailing blanks in karakterstrings worden bewaard door concatenatie, ongeacht de snaren 'datatypes.

For literal insertion, put the strings between the single quote ‘ in the SQL statement. Voor letterlijke insertie, die de strijkers tussen enkele aanhalingstekens "in de SQL-instructie.

Example and Usage : Voorbeeld and Usage:

SELECT ‘Name is ‘ || name FROM table; Selecteer 'Naam is' | | naam FROM tabel;

Name is whatever_name Naam is whatever_name

SELECT number || ‘ - ‘ || description FROM table ORDER BY number SELECT-nummer | | '-' | | beschrijving FROM tabel ORDER BY aantal

1 - description 1 1 - beschrijving 1
2 - description 2 2 - beschrijving 2

Advance Usage : Advance Usage:

It’s possible to use Concatenation and Literal Insertion to generate a set of SQL query language automatically, especially when need to perform same operation to lots of tables, ie dropping a lot of tables. Het is mogelijk om gebruik te maken Aaneenschakeling Letterlijke plaatsingskosten en voor het genereren van een reeks van SQL-query taal automatisch, vooral wanneer nodig voor het uitvoeren van dezelfde operatie te veel tafels, dwz een daling veel tabellen. To do this, format the SQL data query language to output the query result in valid SQL format, and spool the SQL query results to a file. Om dit te doen, het formaat waarin de gegevens SQL query language to output in het query resultaat geldig SQL-formaat, en spoolbestanden de SQL query resultaten naar een bestand. Then execute the file that contains SQL statements. Voer daarna het bestand met SQL statements.

Example: Voorbeeld:

SELECT ‘DROP TYPE ‘ || type_name || ‘;’ SELECT "DROP TYPE '| | type_name | |';"

will generates: zal genereren:

DROP TYPE type_name DROP TYPE type_name

that can be run at SQL*Plus by calling the file with @filename. die kunnen worden uitgevoerd op een SQL * Plus door te bellen naar het bestand met @ filename. All types that been selected from first SQL statements will be dropped from the database. Alle soorten die werden geselecteerd uit de eerste SQL statements zullen worden verwijderd uit de database.

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. BELANGRIJK: Dit is een machine vertaalde pagina die wordt verstrekt "as is" zonder garantie. Machine translation may be difficult to understand. Machine vertaling wellicht moeilijk te begrijpen. Please refer to Raadpleeg original English article origineel Engels artikel whenever possible. als dat mogelijk is.

Share and contribute or get technical support and help at Aandeel en bijdragen of het vinden van technische ondersteuning en hulp bij My Digital Life Forums My Digital Life Forums .



One Response to “Insert Text Literal and Concatenation in Oracle SQL” One Response to "Letterlijke tekst invoegen en aaneenschakeling in Oracle SQL"

  1. Arun
    March 2nd, 2007 21:57 2 maart, 2007 21:57
    1

    Good article. Goed artikel. Got what I was looking for… Heb je wat ik zocht ...

Leave a Reply Verlaat een Antwoord

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> U kunt deze tags: <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. Abonneren op commentaar functie is uitgeschakeld. To receive notification of latest comments posted, subscribe to Voor de ontvangst van de kennisgeving van de meest recente reacties gepost te abonneren My Digital Life Comments RSS feed My Digital Life Reacties RSS feed or of register to receive register te ontvangen new comments in daily email digest. nieuwe opmerkingen in het dagelijks e-mail verteren.
Custom Search

New Articles Nieuwe artikelen

Incoming Search Terms for the Article Inkomende Zoektermen voor het artikel

oracle concatenation orakel concatenatie - -- Concatenation in Oracle Samenvoegen in Oracle - -- concat sqlplus concat sqlplus - -- oracle concat string orakel concat string - -- oracle sql concatenate Oracle SQL aaneenschakelen - -- concatenation oracle concatenatie orakel - -- concat oracle sql concat Oracle SQL - -- insert & in oracle insert & in oracle - -- oracle concat orakel concat - -- SQL SELECT literal SQL SELECT letterlijke - -- sqlplus concatenate sqlplus aaneenschakelen - -- concat char oracle concat char orakel - -- concatenation in oracle sql concatenatie in Oracle SQL - -- concat integer with string in sql oracle concat integer met string in sql orakel - -- concatenate strings with select in oracle aaneenschakelen strings met selecteert in oracle - -- concatenate sql oracle aaneenschakelen sql orakel - -- concatenate in sql oracle aaneenschakelen in sql orakel - -- concatination of strings in sql insert queries concatination van strings sql insert queries - -- concat oracle concat orakel - -- concatenate query in oracle aaneenschakelen query in oracle - -- concatenando query oracle concatenando query orakel - -- concatenate string sql statement aaneenschakelen string sql statement - -- concatenar & oracle sql plus concatenar & Oracle SQL plus - -- insert between a string oracle sql invoegen tussen een string Oracle SQL - -- last character from sql string in oracle laatste teken van sql string in oracle - -- oracle insert oracle invoegen - -- oracle concatenate sql string then execute aaneenschakelen oracle sql string voert dan - -- oracle select statement concatenate strings orakel select statement aaneenschakelen strings - -- oracle sql escape translate Oracle SQL ontsnappen vertalen - -- oracle select concatenate orakel selecteren aaneenschakelen - -- oracle insert string oracle invoegen string - -- oracle Concatenate Examples Voorbeelden orakel aaneenschakelen - -- oracle insert character in string oracle invoegen teken in string - -- oracle query concatenate orakel query aaneenschakelen - -- ORACLE SQL Concatenation Oracle SQL concatenatie - -- oracle sql "order by number" Oracle SQL "order by number" - -- oracle concatenating strings orakel concatenating strings - -- sql select literal example sql selecteren letterlijke voorbeeld - -- sql literal sql letterlijke - -- sql concatenate query sql query aaneenschakelen - -- sql text oracle concatenate sql tekst orakel aaneenschakelen - -- sql oracle query literal oracle sql query letterlijke - -- string concatenation in sql string concatenatie in sql - -- string concatenation on an insert string concatenatie op een insert - -- string concatenation in batch file string concatenatie in een batch-bestand - -- text in oracle select tekst in oracle selecteren - -- "insérer texte dans query sql" "insérer texte dans sql query" - -- concatenation operator for querying text files concatenatie operator voor het bevragen van tekstbestanden - -- concatenate select oracle aaneenschakelen selecteren orakel - -- concatenation of string in oracle concatenatie van in het orakel string - --