What platform are you on? If you're on windows you probably won't have less installed, in which case you'll need to either (a) install it or (b) use a different pager (not sure what you'll have with windows, you'd have to independently research it). I'm assuming that what you want is to have the list of column names as your first row, then each row thereafter on a single line in your display window (i.e. no wrapping of those lines on display). If you need to get column names into the output for each cell, then you'll need to do some post-processing of your own.

Chris

Asif Iqbal wrote:
That works with \G switch , but without the \G switch Istill get it
wrapped

wish I can remeber the switch

On Tue, 3 Jun 2003, Chris Tucker wrote:


The pager option can be used to accomplish this (if you don't mind having things
running through, e.g., less).  When I need to do this I just do:
mysql> \P less -S
mysql> <my query here>

You'll get unwrapped output (the -S option to less tells it to truncate rather
than wrap over-long lines).

You can use anything you like as your pager (as far as I can tell): all it has
to do is take some input on the input stream and write its output out to the
output stream.  It is up to the pager how it does this: in the example of less
it will paginate and not wrap.  Other pagers can be used to achieve different
results, processing the stream however you like, based on your needs.

Cheers,
Chris

Asif Iqbal wrote:

mysql> select * from Tickets limit 1;
+----+-------------+-------+--------+----------------+------------+-------+---------------+-----------------+---------------+----------+----------+------------+----------+---------------------+--------+---------+---------------------+----------+---------------+---------------------+---------+---------------------+----------+
| id | EffectiveId | Queue | Type   | IssueStatement | Resolution | Owner
| Subject       | InitialPriority | FinalPriority | Priority | Status   |
TimeWorked | TimeLeft | Told                | Starts | Started | Due
| Resolved | LastUpdatedBy | LastUpdated         | Creator | Created
| Disabled |
+----+-------------+-------+--------+----------------+------------+-------+---------------+-----------------+---------------+----------+----------+------------+----------+---------------------+--------+---------+---------------------+----------+---------------+---------------------+---------+---------------------+----------+
|  5 |           5 |     4 | ticket |           NULL |       NULL |    16
| RE: phonebook |              10 |            80 |       10 | resolved |
0 |     NULL | 1970-01-01 00:00:00 | NULL   | NULL    | 1970-01-01
00:00:00 | NULL     |             1 | 2001-04-17 18:38:02 |       1 |
2001-04-17 18:26:46 |        0 |
+----+-------------+-------+--------+----------------+------------+-------+---------------+-----------------+---------------+----------+----------+------------+----------+---------------------+--------+---------+---------------------+----------+---------------+---------------------+---------+---------------------+----------+
1 row in set (0.00 sec)

Is there a way I can get the output unwrapped

something like this

mysql> select * from Tickets limit 1 \G
*************************** 1. row ***************************
            id: 5
   EffectiveId: 5
         Queue: 4
          Type: ticket
IssueStatement: NULL
    Resolution: NULL
         Owner: 16
       Subject: RE: phonebook
InitialPriority: 10
 FinalPriority: 80
      Priority: 10
        Status: resolved
    TimeWorked: 0
      TimeLeft: NULL
          Told: 1970-01-01 00:00:00
        Starts: NULL
       Started: NULL
           Due: 1970-01-01 00:00:00
      Resolved: NULL
 LastUpdatedBy: 1
   LastUpdated: 2001-04-17 18:38:02
       Creator: 1
       Created: 2001-04-17 18:26:46
      Disabled: 0
1 row in set (0.00 sec)

Except I want it Horizontally

Thanks

Asif








-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to