This may be an incredibly easy fix, but I can't figure it out!
I'm working with xp_sendmail, and I'm trying to get it send out 2 separate queries.
The problem is that in the body of the e-mail, it puts the right after each other, so it's kind of bad to look at.
Is there any way I can insert a few blanks lines in between these 2 queries ? I tried a simple "print ' ' ", but I get access violation errors.
Suggestions?Well, this may not be an elegant solution, but you can always place a few statements like:
select ''
between your queries to add some blank space. Actually, this may print line separators defpending on your connection configuration, but you can also try something like this:
select char(13) + char(13) + char(13) + char(13) + char(13)
...which will pad your output with five carriage returns.
blindman|||Well that works, but as you said, the line separator shows up, which is kind of an eyesore. Do you or anyone else know any workarounds to this?|||Use the Char(13) method and you can include as many line-feeds as you want and you should only get one separator for the statement.
blindman
Showing posts with label lines. Show all posts
Showing posts with label lines. Show all posts
Thursday, February 16, 2012
blank lines
BLANK Lines
Hi,
I am running a stored procedure with many select
statements in it. I want the output from the stored
procedure NOT to produce Blank lines between each select
query. How can I do this. I am using Query Analyser to
execute the stored procedure and saving the results to a
text file.
Thanks,
SerghiosHi
It is not clear what you are trying to do here. Output in Query analyser is
not really designed for reports. You may want to look at a different tool.
If you are using something like ADO then it is not the blank lines that are
a problem! You will need to move to the next record set to obtain the second
set of results.
Alternatively... if the outputs are the same then you could use a union.
John
"Serghios" <Serghios.Florides@.elthion.com> wrote in message
news:37aa01c37494$4b8b2d60$a401280a@.phx.gbl...
> Hi,
> I am running a stored procedure with many select
> statements in it. I want the output from the stored
> procedure NOT to produce Blank lines between each select
> query. How can I do this. I am using Query Analyser to
> execute the stored procedure and saving the results to a
> text file.
> Thanks,
> Serghios
I am running a stored procedure with many select
statements in it. I want the output from the stored
procedure NOT to produce Blank lines between each select
query. How can I do this. I am using Query Analyser to
execute the stored procedure and saving the results to a
text file.
Thanks,
SerghiosHi
It is not clear what you are trying to do here. Output in Query analyser is
not really designed for reports. You may want to look at a different tool.
If you are using something like ADO then it is not the blank lines that are
a problem! You will need to move to the next record set to obtain the second
set of results.
Alternatively... if the outputs are the same then you could use a union.
John
"Serghios" <Serghios.Florides@.elthion.com> wrote in message
news:37aa01c37494$4b8b2d60$a401280a@.phx.gbl...
> Hi,
> I am running a stored procedure with many select
> statements in it. I want the output from the stored
> procedure NOT to produce Blank lines between each select
> query. How can I do this. I am using Query Analyser to
> execute the stored procedure and saving the results to a
> text file.
> Thanks,
> Serghios
Subscribe to:
Posts (Atom)