Copying and pasting data
 
This tutorial shows you how to move data from other applications, like spreadsheets, text editors, or web browsers, into MySQL tables using Entrance.
 
Copy a column of text into a table
Open a spreadsheet program or a text editor and type in a few lines of text:
 
    George Washington
   John Adams
   John Monroe
   Thomas Jefferson
 
Then select the lines and copy them to the clipboard.  (Command-A Command-C on the Mac, Ctrl-A Ctrl-C on Windows and Linux)
 
Now open Entrance and select “Paste data from clipboard...” from the Edit menu.  You will see dialog like this one:
 
 
Fill in a name for the new table, say “Presidents”, make sure the other settings match the picture, and then click OK.  Now you have a table named “Presidents”.
 
Next, you might want to change the column name in Presidents from “COL0” to something more descriptive, like “Name”.  Here’s how to do that:  Open the column popup menu (Ctrl-Click on column ‘COL0’ on the Mac, right click on Windows) and select “Rename Column...”.  Enter a new name and click Ok.  
 
Pasting a table with more than one column
Open your spreadsheet or editor again.  This time enter more than one column of text.  If you are using an editor, type in (Press the “tab” key instead of typing out the word “(tab)”):
 
   1(tab)George Washington
   2(tab)John Adams
   3(tab)John Monroe
   4(tab)Thomas Jefferson
 
Create a table using Entrance as you did before:  select all, copy to clipboard, then switch to Entrance and use “Paste data” to create the new table.  This time you will have a table with two columns.  
  
Pasting data from a web page
You can also copy and paste data from web pages into a database.  Select some cells in a table containing data on a web page.  You can copy them to the clipboard from your browser by clicking Ctrl-C or (Command-C on the Mac).  Then select Edit | Paste data... in Entrance, just as before..
 
Some details
The tables you create this way will all have column types appropriate for storing strings up to 255 characters long.  These column types work just fine for simple things like address books and mailing lists.  Arithmetic operations and functions like sum() and max()  will work, too.
 
For more advanced applications you may want different columns.  If that’s the case, you can rename columns, change column types, add columns and delete them from the column popup menus (Ctrl-click on a Mac, right click on Windows).  
 
 
 
 
Please note:  This web page and other Entrance documentation web pages are copyrighted material and have not been released under the terms of the GPL.
 
Copyright (c) Tod Landis 2006,2007 All Rights Reserved                           Modified:  March 7, 2007
 
 
Java and the Java Coffee Cup Logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.  Solaris is a trademark of Sun Microsystems, Inc.  MySQL is a registered trademark of MySQL AB in the United States, the European Union and other countries.  Windows is a trademark of Microsoft Corporation.  Macintosh is a trademark of Apple Computer, Inc.