Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Filling Email Body

Author  Topic 

Mrrenzo0861
Starting Member

5 Posts

Posted - 2007-07-11 : 12:43:47
I am trying to send email using a stored procedure. My problem is line feed/carriage return when filling the body of the email. I'm getting an error message when using +chr(10) or +chr(13). But when I take the plus sign out it doesn't go to a new line. Here is my code.

IF v_prev_user_id = cr_error.ste_user_id THEN
v_error_line := v_error_line||cr_error.ste_entity_code||', '||
cr_error.ste_form_id||', '||
cr_error.ste_vertex_geocode||', '||
cr_error.ste_user_id||', '||
cr_error.ste_error_message||', '||
cr_error.ste_error_date+chr(10);

cas_o
Posting Yak Master

154 Posts

Posted - 2007-07-12 : 06:21:42
CHR (without the vowel A) is MS Access. SQL Server has CHAR (with the vowel A)

v_error_line := v_error_line||cr_error.ste_entity_code||', '||
cr_error.ste_form_id||', '||
cr_error.ste_vertex_geocode||', '||
cr_error.ste_user_id||', '||
cr_error.ste_error_message||', '||
cr_error.ste_error_date+CHAR(13) + CHAR(10);

;-]... Quack Waddle
Go to Top of Page

Mrrenzo0861
Starting Member

5 Posts

Posted - 2007-07-12 : 09:30:49
I'm getting this message now. PLS-00222: no function with name 'CHAR' exists in this scope.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-07-12 : 09:50:11
what kind of syntax are you using? this doesn't look like microsoft sql server.


Also moved from script library, because script library is for posting working scripts.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

Mrrenzo0861
Starting Member

5 Posts

Posted - 2007-07-12 : 09:52:13
oracle sql i guess.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-07-12 : 09:56:01
you guess?? it's important to know what RDBMS are you using.

also this forum is only for Microsoft's SQL Server product.

for oracle forums check dbforums:
http://www.dbforums.com/forumdisplay.php?f=4

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

Mrrenzo0861
Starting Member

5 Posts

Posted - 2007-07-12 : 10:20:49
I didn't know there was more than 1 version of sql. Just started using it.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-07-12 : 10:23:28
oh yes...
you got
MS SQL Server
Oracle
MySql
PostgreSQL
Firebird
sybase

and a few others...

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

Mrrenzo0861
Starting Member

5 Posts

Posted - 2007-07-12 : 10:31:14
mine is oracle sql then.
Go to Top of Page

cas_o
Posting Yak Master

154 Posts

Posted - 2007-07-13 : 04:41:47
Try this forum:

http://forums.oracle.com/forums/

;-]... Quack Waddle
Go to Top of Page
   

- Advertisement -