Re: mysql query output get wrapped

2003-06-05 Thread Don Read

On 03-Jun-2003 Asif Iqbal wrote:
 
 something like this
 
 ++-+---++++---
 +---+-+
| id | EffectiveId | Queue | Type   | IssueStatement | Resolution | Owner
| Subject   | InitialPriority |
 ++-+---++++---
 +---+-+
|  5 |   5 | 4 | ticket |   NULL |   NULL |16
| RE: phonebook |  10 |
 ++-+---++++---
 +---+-+
 
 *unwrapped*
 

xterm +aw

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.
(53kr33t w0rdz: sql table query)


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



Re: mysql query output get wrapped

2003-06-04 Thread Paul DuBois
At 11:27 -0400 6/3/03, 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
What would that look like?  I'm having trouble understanding how your
request isn't self-contradictory (it seems you want vertical output, but
horizontal?).
Thanks

Asif



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


RE: mysql query output get wrapped

2003-06-04 Thread Sagar, Sanjeev
Try -E option or put \g in end of your sql statement like below

Mysql -u id -ppasswd -E -e show innodb status

OR

Mysql -u id -ppasswd -e show innodb status \g 

I am not sure it is little g or capital G. Try both way.

-Original Message-
From: Asif Iqbal [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 10:27 AM
To: [EMAIL PROTECTED]
Subject: mysql query output get wrapped



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]

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



RE: mysql query output get wrapped

2003-06-04 Thread Asif Iqbal

mysql select * from Tickets limit 1 \g
++-+---++++---+---+-+---+--+--++--+-++-+-+--+---+-+-+-+--+
| 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.01 sec)


That did not help . I not \G is not the one

On Tue, 3 Jun 2003, Sagar, Sanjeev wrote:

 Try -E option or put \g in end of your sql statement like below

 Mysql -u id -ppasswd -E -e show innodb status

 OR

 Mysql -u id -ppasswd -e show innodb status \g

 I am not sure it is little g or capital G. Try both way.

 -Original Message-
 From: Asif Iqbal [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 03, 2003 10:27 AM
 To: [EMAIL PROTECTED]
 Subject: mysql query output get wrapped



 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



-- 
Asif Iqbal
http://pgpkeys.mit.edu:11371/pks/lookup?op=getsearch=0x8B686E08
There's no place like 127.0.0.1


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



Re: mysql query output get wrapped

2003-06-04 Thread Paul DuBois
At 11:39 -0400 6/3/03, Asif Iqbal wrote:
I want the columns unwrapped to make it easy to read. Sorry if I confused
you earlier
I still don't know what you mean.  What would this output *look like*?
Please show an example.


On Tue, 3 Jun 2003, Paul DuBois wrote:

 At 11:27 -0400 6/3/03, 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
 What would that look like?  I'm having trouble understanding how your
 request isn't self-contradictory (it seems you want vertical output, but
 horizontal?).
 
 Thanks
 
 Asif
 

--
Asif Iqbal
http://pgpkeys.mit.edu:11371/pks/lookup?op=getsearch=0x8B686E08
There's no place like 127.0.0.1
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


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


Re: mysql query output get wrapped

2003-06-04 Thread Asif Iqbal

something like this

++-+---++++---+---+-+
| id | EffectiveId | Queue | Type   | IssueStatement | Resolution | Owner
| Subject   | InitialPriority |
++-+---++++---+---+-+
|  5 |   5 | 4 | ticket |   NULL |   NULL |16
| RE: phonebook |  10 |
++-+---++++---+---+-+

*unwrapped*


On Tue, 3 Jun 2003, Paul DuBois wrote:

 At 11:39 -0400 6/3/03, Asif Iqbal wrote:
 I want the columns unwrapped to make it easy to read. Sorry if I confused
 you earlier

 I still don't know what you mean.  What would this output *look like*?
 Please show an example.

 
 
 On Tue, 3 Jun 2003, Paul DuBois wrote:
 
   At 11:27 -0400 6/3/03, 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
 
   What would that look like?  I'm having trouble understanding how your
   request isn't self-contradictory (it seems you want vertical output, but
   horizontal?).
 
   
   Thanks
   
   Asif
   
 
 
 
 --
 Asif Iqbal
 http://pgpkeys.mit.edu:11371/pks/lookup?op=getsearch=0x8B686E08
 There's no place like 127.0.0.1
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
Asif Iqbal
http://pgpkeys.mit.edu:11371/pks/lookup?op=getsearch=0x8B686E08
There's no place like 127.0.0.1


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



Re: mysql query output get wrapped

2003-06-04 Thread Thomas Spahni
Asif,

try this:

prompt echo select * from Tickets limit 1; | mysql mydb  result.file

You get everything in ONE line.

Cheers,
Thomas

On Tue, 3 Jun 2003, 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]



Re: mysql query output get wrapped

2003-06-04 Thread Cal Evans
use a smaller font.  This is really a function of your shell or client, not
MySQL.

humbly,
=C=
* Cal Evans
* http://www.christianperformer.com
* Stay plugged into your audience
* The measure of a programmer is not the number of lines of code he writes
but the number of lines he does not have to write.
*

- Original Message -
From: Asif Iqbal [EMAIL PROTECTED]
To: Paul DuBois [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 10:57 AM
Subject: Re: mysql query output get wrapped



 something like this


++-+---++++---+-
--+-+
 | id | EffectiveId | Queue | Type   | IssueStatement | Resolution | Owner
 | Subject   | InitialPriority |

++-+---++++---+-
--+-+
 |  5 |   5 | 4 | ticket |   NULL |   NULL |16
 | RE: phonebook |  10 |

++-+---++++---+-
--+-+

 *unwrapped*


 On Tue, 3 Jun 2003, Paul DuBois wrote:

  At 11:39 -0400 6/3/03, Asif Iqbal wrote:
  I want the columns unwrapped to make it easy to read. Sorry if I
confused
  you earlier
 
  I still don't know what you mean.  What would this output *look like*?
  Please show an example.
 
  
  
  On Tue, 3 Jun 2003, Paul DuBois wrote:
  
At 11:27 -0400 6/3/03, 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
  
What would that look like?  I'm having trouble understanding how
your
request isn't self-contradictory (it seems you want vertical output,
but
horizontal?).
  

Thanks

Asif

  
  
  
  --
  Asif Iqbal
  http://pgpkeys.mit.edu:11371/pks/lookup?op=getsearch=0x8B686E08
  There's no place like 127.0.0.1
  
  
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 

 --
 Asif Iqbal
 http://pgpkeys.mit.edu:11371/pks/lookup?op=getsearch=0x8B686E08
 There's no place like 127.0.0.1


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




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com

Re: mysql query output get wrapped

2003-06-04 Thread Asif Iqbal

Did not work

prompt  echo select * from Tickets limit 1; | mysql mydb  res
prompt  cat res

id  EffectiveId Queue   TypeIssueStatement  Resolution
Owner   Subject InitialPriority FinalPriority   PriorityStatus
TimeWorked  TimeLeftToldStarts  Started Due Resolved
LastUpdatedBy   LastUpdated Creator Created Disabled
5   5   4   ticket  NULLNULL16  RE: phonebook   10
80  10  resolved0   NULL1970-01-01 00:00:00
NULLNULL1970-01-01 00:00:00 NULL1   2001-04-17
18:38:02 1   2001-04-17 18:26:46 0

Still wrapped :-)

On Tue, 3 Jun 2003, Thomas Spahni wrote:

 Asif,

 try this:

 prompt echo select * from Tickets limit 1; | mysql mydb  result.file

 You get everything in ONE line.

 Cheers,
 Thomas

 On Tue, 3 Jun 2003, 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
 
 



-- 
Asif Iqbal
http://pgpkeys.mit.edu:11371/pks/lookup?op=getsearch=0x8B686E08
There's no place like 127.0.0.1


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



Re: mysql query output get wrapped

2003-06-04 Thread Asif Iqbal

I did that before with a switch , just forgot

On Tue, 3 Jun 2003, Cal Evans wrote:

 use a smaller font.  This is really a function of your shell or client, not
 MySQL.

 humbly,
 =C=
 * Cal Evans
 * http://www.christianperformer.com
 * Stay plugged into your audience
 * The measure of a programmer is not the number of lines of code he writes
 but the number of lines he does not have to write.
 *

 - Original Message -
 From: Asif Iqbal [EMAIL PROTECTED]
 To: Paul DuBois [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Tuesday, June 03, 2003 10:57 AM
 Subject: Re: mysql query output get wrapped


 
  something like this
 
 
 ++-+---++++---+-
 --+-+
  | id | EffectiveId | Queue | Type   | IssueStatement | Resolution | Owner
  | Subject   | InitialPriority |
 
 ++-+---++++---+-
 --+-+
  |  5 |   5 | 4 | ticket |   NULL |   NULL |16
  | RE: phonebook |  10 |
 
 ++-+---++++---+-
 --+-+
 
  *unwrapped*
 
 
  On Tue, 3 Jun 2003, Paul DuBois wrote:
 
   At 11:39 -0400 6/3/03, Asif Iqbal wrote:
   I want the columns unwrapped to make it easy to read. Sorry if I
 confused
   you earlier
  
   I still don't know what you mean.  What would this output *look like*?
   Please show an example.
  
   
   
   On Tue, 3 Jun 2003, Paul DuBois wrote:
   
 At 11:27 -0400 6/3/03, 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
   
 What would that look like?  I'm having trouble understanding how
 your
 request isn't self-contradictory (it seems you want vertical output,
 but
 horizontal?).
   
 
 Thanks
 
 Asif
 
   
   
   
   --
   Asif Iqbal
   http://pgpkeys.mit.edu:11371/pks/lookup?op=getsearch=0x8B686E08
   There's no place like 127.0.0.1
   
   
   --
   MySQL General Mailing List
   For list archives: http://lists.mysql.com/mysql
   To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
  
  
 
  --
  Asif Iqbal
  http://pgpkeys.mit.edu:11371/pks/lookup?op=getsearch=0x8B686E08
  There's no place

Re: mysql query output get wrapped

2003-06-04 Thread Paul DuBois
At 11:57 -0400 6/3/03, Asif Iqbal wrote:
something like this

++-+---++++---+---+-+
| id | EffectiveId | Queue | Type   | IssueStatement | Resolution | Owner
| Subject   | InitialPriority |
++-+---++++---+---+-+
|  5 |   5 | 4 | ticket |   NULL |   NULL |16
| RE: phonebook |  10 |
++-+---++++---+---+-+
*unwrapped*
That stilll looks wrapped to me.

Anyway, no, there is no option for doing that.  You'd need to perform
this kind of formatting yourself.


On Tue, 3 Jun 2003, Paul DuBois wrote:

 At 11:39 -0400 6/3/03, Asif Iqbal wrote:
 I want the columns unwrapped to make it easy to read. Sorry if I confused
 you earlier
 I still don't know what you mean.  What would this output *look like*?
 Please show an example.
 
 
 On Tue, 3 Jun 2003, Paul DuBois wrote:
 
   At 11:27 -0400 6/3/03, 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
 
   What would that look like?  I'm having trouble understanding how your
   request isn't self-contradictory (it seems you want vertical output, but
   horizontal?).
 
   
   Thanks
   
Asif


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


RE: mysql query output get wrapped

2003-06-04 Thread Keith Stevenson
Asif,
If I understand you correctly, you should just be able to increase
the size of the DOS window (Of course this would have to be on Windwos).

If so simply right click the Title Bar and Choose Properties, then on the
Layout Tab increase the Window Size and Screen Buffer size 

Hope this Helps

Kind Regards


-Original Message-
From: Asif Iqbal [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 4:57 PM
To: Paul DuBois
Cc: [EMAIL PROTECTED]
Subject: Re: mysql query output get wrapped



something like this

++-+---++++---+-
--+-+
| id | EffectiveId | Queue | Type   | IssueStatement | Resolution | Owner
| Subject   | InitialPriority |
++-+---++++---+-
--+-+
|  5 |   5 | 4 | ticket |   NULL |   NULL |16
| RE: phonebook |  10 |
++-+---++++---+-
--+-+

*unwrapped*


On Tue, 3 Jun 2003, Paul DuBois wrote:

 At 11:39 -0400 6/3/03, Asif Iqbal wrote:
 I want the columns unwrapped to make it easy to read. Sorry if I 
 confused you earlier

 I still don't know what you mean.  What would this output *look like*? 
 Please show an example.

 
 
 On Tue, 3 Jun 2003, Paul DuBois wrote:
 
   At 11:27 -0400 6/3/03, 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
 
   What would that look like?  I'm having trouble understanding how 
  your  request isn't self-contradictory (it seems you want vertical 
  output, but  horizontal?).
 
   
   Thanks
   
   Asif
   
 
 
 
 --
 Asif Iqbal 
 http://pgpkeys.mit.edu:11371/pks/lookup?op=getsearch=0x8B686E08
 There's no place like 127.0.0.1
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
Asif Iqbal http://pgpkeys.mit.edu:11371/pks/lookup?op=getsearch=0x8B686E08
There's no place like 127.0.0.1


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

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



RE: mysql query output get wrapped

2003-06-04 Thread Barry.Dancis

MySql returns data on a record basis and you are asking it to take a line's
worth of data from two records (the column header output is like a record)
and display it and then take the next line's worth of data from the same two
records and display it and repeat until the data from those records has been
exhausted. It is not set up to do that. 

If I was using Oracle I would make the line size the width of the
data (~320 chars) and the page size = 1 record. I would save the results to a
file and then write perl script to do the chopping as described above. I
don't know if mysql has similar features. I didn't find them in the manual.

Barry

-Original Message-
From: Asif Iqbal [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 12:10 PM
To: Thomas Spahni
Cc: [EMAIL PROTECTED]
Subject: Re: mysql query output get wrapped



Did not work

prompt  echo select * from Tickets limit 1; | mysql mydb  res
prompt  cat res

id  EffectiveId Queue   TypeIssueStatement  Resolution
Owner   Subject InitialPriority FinalPriority   PriorityStatus
TimeWorked  TimeLeftToldStarts  Started Due Resolved
LastUpdatedBy   LastUpdated Creator Created Disabled
5   5   4   ticket  NULLNULL16  RE: phonebook   10
80  10  resolved0   NULL1970-01-01 00:00:00
NULLNULL1970-01-01 00:00:00 NULL1   2001-04-17
18:38:02 1   2001-04-17 18:26:46 0

Still wrapped :-)

On Tue, 3 Jun 2003, Thomas Spahni wrote:

 Asif,

 try this:

 prompt echo select * from Tickets limit 1; | mysql mydb  result.file

 You get everything in ONE line.

 Cheers,
 Thomas

 On Tue, 3 Jun 2003, 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
 
 



-- 
Asif Iqbal
http://pgpkeys.mit.edu:11371/pks/lookup?op=getsearch=0x8B686E08
There's no place like 127.0.0.1


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


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



Re: mysql query output get wrapped

2003-06-04 Thread Chris Tucker
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]


Re: mysql query output get wrapped

2003-06-04 Thread Asif Iqbal

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
 




-- 
Asif Iqbal
http://pgpkeys.mit.edu:11371/pks/lookup?op=getsearch=0x8B686E08
There's no place like 127.0.0.1


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



Re: mysql query output get wrapped

2003-06-04 Thread Chris Tucker
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]


Re: mysql query output get wrapped

2003-06-04 Thread Asif Iqbal

I am on solaris 2.8 sparc. You less works fine if I use \G switch. But I
want (as you explained) list of column names in one line in first row and
the results are thereafter in single rows instead of getting wrapped.

Like I said wish I remebered the swithc for that

On Tue, 3 Jun 2003, Chris Tucker wrote:

 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
 
 
 
 
 




-- 
Asif Iqbal
http://pgpkeys.mit.edu:11371/pks/lookup?op=getsearch=0x8B686E08
There's no place like 127.0.0.1


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



Re: mysql query output get wrapped

2003-06-04 Thread Chris Tucker
Are you using the -S switch to less?  Note that it's a capital S, not lower 
case.  Does the output get properly sent through the less pager (i.e do you have 
to page through the results that get selected)?  Check the manpage for less on 
your machine and find out what the truncate lines option is, if it is different 
(highly unlikely).  Or try a different pager.  Make sure you execute your SQL 
command using \g or ;.  Make sure you don't have anything funky set in your 
client section of your my.cnf that may mess with pagers/output.  See whether 
using tee (\T filename) tees the output into the specified output file without 
wrapping.

Chris

Asif Iqbal wrote:
I am on solaris 2.8 sparc. You less works fine if I use \G switch. But I
want (as you explained) list of column names in one line in first row and
the results are thereafter in single rows instead of getting wrapped.
Like I said wish I remebered the swithc for that

On Tue, 3 Jun 2003, Chris Tucker wrote:


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 

RE: mysql query output get wrapped

2003-06-04 Thread Christensen, Dave
Since this in running in Windows, I don't think you will have much luck  in
a simple console display.  While you can change size properties for Window
and Screen Buffer, these sizes are ONLY for length and you can't really do
much for horizontal size.

What I'd suggest tying is to run mysql as a command line batch job with the
results being redirected into a .txt file that you could open with an editor
that will allow wider lines.  Something like:


C:\mysql -uuserid -pyourpassword  yourcommandtext.sql 
yourcommandoutput.txt 



Without using a tool like EMS MySQL Manager, etc, I think this might be your
best bet.

-Original Message-
From: Keith Stevenson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 11:14 AM
To: 'Asif Iqbal'; Paul DuBois
Cc: [EMAIL PROTECTED]
Subject: RE: mysql query output get wrapped


Asif,
If I understand you correctly, you should just be able to increase
the size of the DOS window (Of course this would have to be on Windwos).

If so simply right click the Title Bar and Choose Properties, then on the
Layout Tab increase the Window Size and Screen Buffer size 

Hope this Helps

Kind Regards


-Original Message-
From: Asif Iqbal [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 4:57 PM
To: Paul DuBois
Cc: [EMAIL PROTECTED]
Subject: Re: mysql query output get wrapped



something like this

++-+---++++---+-
--+-+
| id | EffectiveId | Queue | Type   | IssueStatement | Resolution | Owner
| Subject   | InitialPriority |
++-+---++++---+-
--+-+
|  5 |   5 | 4 | ticket |   NULL |   NULL |16
| RE: phonebook |  10 |
++-+---++++---+-
--+-+

*unwrapped*


On Tue, 3 Jun 2003, Paul DuBois wrote:

 At 11:39 -0400 6/3/03, Asif Iqbal wrote:
 I want the columns unwrapped to make it easy to read. Sorry if I
 confused you earlier

 I still don't know what you mean.  What would this output *look like*?
 Please show an example.

 
 
 On Tue, 3 Jun 2003, Paul DuBois wrote:
 
   At 11:27 -0400 6/3/03, 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

Re: mysql query output get wrapped

2003-06-04 Thread Joel Rees
 Did not work

I wonder ...

 prompt  echo select * from Tickets limit 1; | mysql mydb  res
 prompt  cat res
 
 id  EffectiveId Queue   TypeIssueStatement  Resolution
 Owner   Subject InitialPriority FinalPriority   PriorityStatus
 TimeWorked  TimeLeftToldStarts  Started Due Resolved
 LastUpdatedBy   LastUpdated Creator Created Disabled
 5   5   4   ticket  NULLNULL16  RE: phonebook   10
 80  10  resolved0   NULL1970-01-01 00:00:00
 NULLNULL1970-01-01 00:00:00 NULL1   2001-04-17
 18:38:02 1   2001-04-17 18:26:46 0
 
 Still wrapped :-)
 ...

How wide is your terminal window?

I've never had CRs actually put into the output, so all I've ever dealt
with was terminal wrap. Judging from the header lines

   ++-+---++++---+---+-+---+--+--++--+-++-+-+--+---+-+-+-+--+
   |  5 |   5 | 4 | ticket |   NULL |   NULL |16
   ...

I'm guessing your problem is terminal wrap, too. Viewing in the GUI (X
Windowing System) is probably your answer. Stretch your terminal window
wide. If that isn't enough, pipe to a file and break out a text editor
that scrolls horizontally as well as vertically.

-- 
Joel Rees [EMAIL PROTECTED]


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