If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Find and Delete rows with less than 100 characters

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-18-10, 18:39
phellstrand phellstrand is offline
Registered User
 
Join Date: Oct 2010
Posts: 2
Find and Delete rows with less than 100 characters

Hi,

I'm working with a database that has one column that contains rows with verbatim (text). I want to delete each row that has less than 100 characters. How would I write this query?

Any help is appreciated!
Thank you,
Patrik
Reply With Quote
  #2 (permalink)  
Old 10-18-10, 18:44
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
whoa, this is a tricky one

j/k


Code:
DELETE 
  FROM daTable
 WHERE LENGTH(daColumn) < 100
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 10-18-10, 19:00
phellstrand phellstrand is offline
Registered User
 
Join Date: Oct 2010
Posts: 2
Awesome; thank you! Not easy for us non-techs...
-P
Reply With Quote
Reply

Tags
mysql query

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On