January 6, 2004 at 3:05 am
I am writing a stored proc to generate html from a result set however I always get the dotted line before the result set. How can I get rid of this ?
Thanks
January 6, 2004 at 3:19 am
Not sure if I understand you.
Can you post your code?
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 6, 2004 at 3:29 am
ok
I have
SELECT
"<TR><TD>"+
PLAYER + "</TD><TD>" +
CONVERT(varchar(15),WEEK_DATE,106) + "</TD><TD>" +
CONVERT(varchar(6),AGGT_PUTT) + "</TD><TD>" +
CONVERT(varchar(6),AGGT_DRIVE) + "</TD><TD>" +
CONVERT(varchar(6),AGGT_SCORE) + "</TD><TD>" +
CONVERT(varchar(6),AGGT_TOTAL) + "</TD></TR>"
FROM
pga..PLAYER_PROGRESS
WHERE
UNIQUEKEY = "HTANA"
I get
------------------------------------------------------------------------------------------------------------------------------------
<TR><TD>Hidemichi Tanaka </TD><TD>17 Nov 2003</TD><TD>0</TD><TD>0</TD><TD>0</TD><TD>0</TD></TR>
How do I get rid of the ----------------------------------------------------------------------------------------
Thanks
January 6, 2004 at 4:09 am
Hi,
I really hope that I have not TOTALLY missed it.
Are you using Query Analyser? If so are you using "Query results in Text"?
Change the Query Analyser to return the results in a Grid.
Andy.
January 6, 2004 at 4:16 am
Any reasons why you're doing this at the server and not at the client?
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 6, 2004 at 4:58 am
OK Guys, I obviously havent explained this well enough
The piece of SQL is from a stored procedure. I run the stored procedure from a DOS command line using Isql and writing the results out to a file (results.htm), which I then browse using IE5/6
However, any SELECT FROM that is performed inside the stored procedure always produces this ---------------- line before the results which makes my HTML look bad.
SOOOOOOOOO
How can I prevent this from coming out in the result set of the stored procedure and thus getting into my text file
January 6, 2004 at 5:04 am
That's a T-sql option :
Tools\Options\Results uncheck the checkbox and apply.
Your applications will not have this by default.
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
January 6, 2004 at 5:10 am
C:\>isql /?
isql: unknown option ?
usage: isql [-U login id] [-P password]
[-S server] [-H hostname] [-E trusted connection]
[-d use database name] [-l login timeout] [-t query timeout]
[-h headers] [-s colseparator] [-w columnwidth]
[-a packetsize] [-e echo input] [-x max text size]
[-L list servers] [-c cmdend]
[-q "cmdline query"] [-Q "cmdline query" and exit]
[-n remove numbering] [-m errorlevel]
[-r msgs to stderr]
[-i inputfile] [-o outputfile]
[-p print statistics] [-b On error batch abort]
[-O use Old ISQL behavior disables the following]
<EOF> batch processing
Auto console width scaling
Wide messages
default errorlevel is -1 vs 1
[-? show syntax summary (this screen)]
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
January 6, 2004 at 5:20 am
from BOL :
-h headers
Specifies the number of rows to print between column headings. The default is to print headings one time for each set of query results. Use -1 to specify that no headers will be printed. If using -1, there must be no space between the parameter and the setting (-h-1, not -h -1).
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply