December 2010
Intermediate to advanced
451 pages
11h 16m
English
You have two or more text strings, or variables containing strings, that you want to combine.
Use the concatenation operator to append the strings. In the following example, you can see that two variables are concatenated to a string of text to form a single string of text:
DECLARE
CURSOR emp_cur IS
SELECT employee_id, first_name, last_name
FROM EMPLOYEES
WHERE HIRE_DATE > TO_DATE('01/01/2000','MM/DD/YYYY');
emp_rec emp_cur%ROWTYPE;
emp_string VARCHAR2(150);
BEGIN
DBMS_OUTPUT.PUT_LINE('EMPLOYEES HIRED AFTER 01/01/2000');
DBMS_OUTPUT.PUT_LINE('================================');
FOR emp_rec IN emp_cur LOOP
emp_string := emp_rec.first_name || ' ' || emp_rec.last_name ...Read now
Unlock full access