Excel To SQL
Revision as of 13:16, 5 October 2007 by Adam Franco (talk | contribs)
- Copy from Excel, pasted into text editor
- Escape single quotes:
- Find:
'
- Replace:
\\'
- Find:
- Replace tab-delimited with SQL VALUES formatted lines:
- Find:
([^\t\r]*)\t([^\t\r]*)\t([^\t\r]*)\t([^\t\r]*)\t?([^\t\r]*)?\t?([^\t\r]*)?\t?([^\t\r]*)?
- Replace:
('masters', '\1', '\2', '\3', '\4', '\5', '\6', '\7'),
- Find:
- Remove the last comma from the end of the file.
- Add INSERT statement to top of file:
INSERT INTO theses ( `group` , `department` , `last_name` , `first_name` , `title` , `year` , `notes` , `alternate_formats`) VALUES
- This page was last edited on 5 October 2007, at 13:16.
- Privacy policy
- About Library & ITS Wiki
- Disclaimers