473,406 Members | 2,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Jumbled output

Hello

The problem I am experiencing is the output from the select statement
below. The table breaks up on the left side and loses information.

Yet, when I run the select command from a batch file (second group), it
looks as if everything is in order - tab separated fields.

Another problem (I think) is the null (\N) fields became 'N' under remarks
in the 6th and 7th rows.

(This example is from the MySQL manual tutorial.)

Can anyone point out the error if there is one? Many thanks for any
help offered.

Chris

mysql> select * from event;
+----------+------------+----------+------------------------------+
| name | date | type | remark |
+----------+------------+----------+------------------------------+
|Fluffy | 1995-05-15 | litter | 4 kittens, 3 female, 1 male
|Buffy | 1993-06-23 | litter | 5 puppies, 2 female, 3 male
| | 1994-06-19 | litter | 3 puppies, 3 female
|rpy | 1999-03-21 | vet | needed beak straightened
|8-03 | vet | broken rib
|nnel | N
|nnel | N
| | 1998-08-28 | birthday | Gave him a new chew toy
|laws | 1998-03-17 | birthday | Gave him a new flea collar
|98-12-09 | birthday | First birthday
+----------+------------+----------+------------------------------+
10 rows in set (0.00 sec)

C:\mysql>mysql < batch_file.txt
name date type remark
Fluffy 1995-05-15 litter 4 kittens, 3 female, 1 male
Buffy 1993-06-23 litter 5 puppies, 2 female, 3 male
Buffy 1994-06-19 litter 3 puppies, 3 female
Chirpy 1999-03-21 vet needed beak straightened
Slim 1997-08-03 vet broken rib
Bowser 1991-10-12 kennel N
Fang 1991-10-12 kennel N
Fang 1998-08-28 birthday Gave him a new chew toy
Claws 1998-03-17 birthday Gave him a new flea collar
Whistler 1998-12-09 birthday First birthday

mysql> describe event;
+--------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+--------------+------+-----+---------+-------+
| name | varchar(20) | YES | | NULL | |
| date | date | YES | | NULL | |
| type | varchar(15) | YES | | NULL | |
| remark | varchar(255) | YES | | NULL | |
+--------+--------------+------+-----+---------+-------+
4 rows in set (0.00 sec)
Jul 19 '05 #1
0 1259

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mark Wilson CPU | last post by:
This must be easy, but I'm missing something... I want to execute a Perl script, and capture ALL its output into a PHP variable. Here are my 2 files: -------------------------------------...
2
by: Chris Charley | last post by:
Hello The problem I am experiencing is the output from the select statement below. The table breaks up on the left side and loses information. Yet, when I run the select command from a batch...
5
by: Glenn | last post by:
Hi! Server info - Win2K3 Server +SP1 with 1 GB Memory and 1.5 GB Virtual Memory SQL Server 2000 Enterprise Edition + SP3 running on this. Required result - Create a SQL Script that will...
0
by: newbie | last post by:
i'm a newbie of c language. can anyone help me to implement the code so that I can get the ciphertext from the output. thanks. #ifndef _3DES_H #define _3DES_H #ifndef uint8 #define uint8 ...
3
daJunkCollector
by: daJunkCollector | last post by:
I created a form in flash. The user can fill out each field of the form and submit the information to the $sendTo email address just fine, however, I receive the email section, $message, all jumbled...
3
by: =?Utf-8?B?Rm9nZ3k=?= | last post by:
I have scanned 80 old photographs to a new folder in My Pictures and named them all accordingley.Without apparent input from me they are now completely jumbled up.The names no longer correlate to...
2
by: cmrhema | last post by:
Hi, We have developed a socket program as below, The program works fine, except that it sometimes gives me jumbled messages or same message gets repeated twice. The whole code is produced below....
2
by: gabosom | last post by:
Hi! I've been breaking my head trying to get the output variables from my Stored Procedure. This is my SP code CREATE PROCEDURE GetKitchenOrderDetail( @idService int, --outPut Variables ...
8
by: Sam T | last post by:
Thanks for at least reading this. Quick overview: I am new to object oriented programming (go FORTRAN) and have jumped into developing a C#.NET application that allows a user to input some values in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.