Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / Microsoft SQL Server [игнор отключен] [закрыт для гостей] / tab separated output from xp_sendmail - how? / 5 сообщений из 5, страница 1 из 1
08.08.2002, 20:28:20
    #32041999
Gobzo Kobler
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
tab separated output from xp_sendmail - how?
The users want a tab separated output from the xp_sendmail, but the
Код: plaintext
@separator = CHAR( 9 )
generates an error. How can I send the tab separated results?

Pigtail: Stick what you have to say in your ass.
...
Рейтинг: 0 / 0
08.08.2002, 20:39:20
    #32042003
Gobzo Kobler
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
tab separated output from xp_sendmail - how?
Well, I must have paniced too early. This works:

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
declare @sep varchar( 1 )
select @sep = CHAR( 9 )

EXEC master..xp_sendmail 
   @recipients  = @email_recipient
  ,@message = ''
  ,@query = 'SELECT 1, 2, 3
  ,@subject = @subject
  ,@attach_results = 'FALSE' 
  ,@width =  512 
  ,@separator = @sep
...
Рейтинг: 0 / 0
08.08.2002, 20:55:27
    #32042005
RatTail
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
tab separated output from xp_sendmail - how?
>Pigtail: Stick what you have to say in your ass.
Я согласен. Признаю себя проигравшим негодяем и прошу у тебя прощения.
...
Рейтинг: 0 / 0
08.08.2002, 21:12:37
    #32042009
Glory
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
tab separated output from xp_sendmail - how?
It's not a problem of xp_sendmail. It's general restriction for input parameters for every procedure

BOL - Accessing and Changing Relational Data - Accessing and Changing Data Fundamentals - Using Multiple Statements - Using Variables and Parameters - Parameters

"When a stored procedure is executed, input parameters can either have their value set to a constant or use the value of a variable. "
...
Рейтинг: 0 / 0
09.08.2002, 09:19:59
    #32042046
ms
ms
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
tab separated output from xp_sendmail - how?
I think you need variable as Unicode .this script working correct - I test it now


DECLARE @sep nchar(10) -- as UNICODE
SET @sep=CHAR(9)

EXEC master..xp_sendmail @recipients = 'max_siz@radian.ru',
@message = ' test message',
@query = 'SELECT * FROM sysobjects',
@attachments = 'outTest',
@subject = 'etst',
@attach_results = 'true',
@no_header = 'true',
@width = 300,
@ansi_attachment='true',
@separator =@sep
...
Рейтинг: 0 / 0
Форумы / Microsoft SQL Server [игнор отключен] [закрыт для гостей] / tab separated output from xp_sendmail - how? / 5 сообщений из 5, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]