Formatting of SELECT Query Output



I'm using Adaptive Server 12.5 and have a couple of problems with
formatting the output of SQL SELECT queries for use in further
analysis. The general issue is that it's so inflexible in its output
formatting - there seems to be no format that doesn't include lots of
useless spaces, or will show a date AND time in a concise, all-numeric
form (ideally dd/mm/yy hh:mm:ss). I suppose I have to live with that
one.

However, there is another problem that is driving me insane, and I'm
wondering if it's just me. Every time I use CONVERT on a datetime
field (e.g. with display format 3, dd/mm/yy), every line of the output
includes both a line feed/return and a tab character, immediately
after the date. This means that each row becomes two rows, playing
havoc with the input to another program. I can't see any logical
reason for this aspect of the formatting. Is there something I can add
to the CONVERT function to prevent it? When I have over 100,000 rows
in my results, this issue isn't trivial.

--
John H, UK

.



Relevant Pages

  • Re: mySQL Problem
    ... sql servers) specify precisely where the problem is - this time it ... are things called RESERVED WORDS. ... by virtually any programmer I know. ... *formatting* said query so you could break it down and isolate the problem. ...
    (comp.lang.php)
  • Re: Set based solution
    ... And SQL IS a data manipulation language, hence my problem with not using it ... that I had always used SQL Server to do data formatting for the past 12 ... instead of coding hooks in a dll to do this formatting, ... SQL, and T-SQL, is not a general purpose programming language. ...
    (microsoft.public.sqlserver.programming)
  • Re: mySQL Problem
    ... sql servers) specify precisely where the problem is - this time it ... are things called RESERVED WORDS. ... Steve - I don't agree with your method of "properly formatting" the ... virtually any programmer I know. ...
    (comp.lang.php)
  • Re: Set based solution
    ... coding off the database server, then it is worthwhile doing it. ... I'd argue that formatting things that differ from country ... > And SQL IS a data manipulation language, hence my problem with not using ...
    (microsoft.public.sqlserver.programming)
  • Re: mySQL Problem
    ... sql servers) specify precisely where the problem is - this time it ... queries code readability you are, of course, right, since a programmer ... are things called RESERVED WORDS. ... about formatting. ...
    (comp.lang.php)