Tuesday, November 15, 2011
mysqldump with where condition
mysqldump -u user -ppasswd yourDB yourTable --where="service_category_id in (261, 262)"> signatures_blacklist.sql
Wednesday, November 9, 2011
line terminator
The line terminator expected for each file format is:
unix LF only (each line ends with an LF character).
dos CRLF (each line ends with two characters, CR then LF).
mac CR only (each line ends with a CR character).
CR is carriage return (return cursor to left margin), which is Ctrl-M or ^M or hex 0D.
LF is linefeed (move cursor down), which is Ctrl-J or ^J or hex 0A. Sometimes, LF is written as NL (newline).
Mac OS version 9 and earlier use mac line endings, while Mac OS X and later use unix line endings.
Carriage Return (^M or \r).
LF: Line Feed, U+000A
VT: Vertical Tab, U+000B
FF: Form Feed, U+000C
CR: Carriage Return, U+000D
CR+LF: CR (U+000D) followed by LF (U+000A)
NEL: Next Line, U+0085
LS: Line Separator, U+2028
PS: Paragraph Separator, U+2029
unix LF only (each line ends with an LF character).
dos CRLF (each line ends with two characters, CR then LF).
mac CR only (each line ends with a CR character).
CR is carriage return (return cursor to left margin), which is Ctrl-M or ^M or hex 0D.
LF is linefeed (move cursor down), which is Ctrl-J or ^J or hex 0A. Sometimes, LF is written as NL (newline).
Mac OS version 9 and earlier use mac line endings, while Mac OS X and later use unix line endings.
Carriage Return (^M or \r).
LF: Line Feed, U+000A
VT: Vertical Tab, U+000B
FF: Form Feed, U+000C
CR: Carriage Return, U+000D
CR+LF: CR (U+000D) followed by LF (U+000A)
NEL: Next Line, U+0085
LS: Line Separator, U+2028
PS: Paragraph Separator, U+2029
Monday, November 7, 2011
mysql concat string
update compounds set link=concat("http://www.chemmol.com/chemmol/", mol_id , ".html") ;
Thursday, November 3, 2011
Remove blank lines
Type the following command:
$ sed '/^$/d' input.txt > output.txt
Task: Remove blank lines using grep
$ grep -v '^$' input.txt > output.txt
$ sed '/^$/d' input.txt > output.txt
Task: Remove blank lines using grep
$ grep -v '^$' input.txt > output.txt
Thursday, October 27, 2011
Wednesday, September 21, 2011
How to create duplicate table in MySQL?
mysql> create table signatures_20110921 select * from signatures;
Wednesday, August 31, 2011
mysql remove table name space
You should be able to reference that table using `backticks` or `Acute` , not single quote
mysql>rename table `CDC_Stature_for_age_charts_2 _20` to CDC_Stature_for_age_charts_2_20;
Here is reference:
http://www.grassrootsdesign.com/intro/char.php
mysql>rename table `CDC_Stature_for_age_charts_2 _20` to CDC_Stature_for_age_charts_2_20;
Here is reference:
http://www.grassrootsdesign.com/intro/char.php
Subscribe to:
Posts (Atom)
-
Step 1, New a project rails new demo Step 2, Update Gemfile add paperclip, mysql2 gem, enable JavaScript runtime gem 'mysql2' ...
-
When trying to access transmission from web-browswer i got the message : 403: Forbidden Unauthorized IP Address. Either disable the IP ad...