I have a requirement where i need to prepare data for email ,So i populate
data into column of table having VARCHAR2(4000) as definition, Now what i want, is to insert it into new line wherever i want to .
begin
v_email := v_email ||--new line--??;
end;
Suppose i am preparing email text 'List of all blocked transaction id ' ..in one line 1)transaction_id ....in another lin e 2)transaction_id .....in another line.
I am using oracle as rdbms .
Chr(Number) should work for you. Remember different platforms expect different new line characters: CHR(10) => LF, line feed (unix) CHR(13) => CR, carriage return (windows, together with LF)
It can hold numbers, letters and special characters. Microsoft SQL Server 2008 (and above) can store up to 8000 characters as the maximum length of the string using varchar data type.
SQL Server ' AS 'New Line' -- using carriage return: CHAR(13) SELECT 'First line. '+ CHAR(13) + 'Second line. ' AS 'New Line' -- Using both: CHAR(13)+CHAR(10) SELECT 'First line. '+ CHAR(13)+CHAR(10) + 'Second line.
It is used to store normal characters and alphanumeric characters too. The VARCHAR2 data type can store a character string of a maximum length of 4000 bytes of characters.
You could use the ASCII code and the CHR function to do this.
Here's the entire list. http://www.asciitable.com/
SQL> conn rc/rc@orcl102
Connected.
SQL> set serveroutput on;
SQL> begin
2 dbms_output.put_line('Hello..' || chr(10) || 'how are you...');
3 end;
4 /
Hello..
how are you...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With