powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Microsoft SQL Server [игнор отключен] [закрыт для гостей] / tab separated output from xp_sendmail - how?
5 сообщений из 5, страница 1 из 1
tab separated output from xp_sendmail - how?
    #32041999
Фотография Gobzo Kobler
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
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
tab separated output from xp_sendmail - how?
    #32042003
Фотография Gobzo Kobler
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
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
tab separated output from xp_sendmail - how?
    #32042005
Фотография RatTail
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
>Pigtail: Stick what you have to say in your ass.
Я согласен. Признаю себя проигравшим негодяем и прошу у тебя прощения.
...
Рейтинг: 0 / 0
tab separated output from xp_sendmail - how?
    #32042009
Glory
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
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
tab separated output from xp_sendmail - how?
    #32042046
ms
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
ms
Гость
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
5 сообщений из 5, страница 1 из 1
Форумы / Microsoft SQL Server [игнор отключен] [закрыт для гостей] / tab separated output from xp_sendmail - how?
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


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