Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sharonejackson
Starting Member
3 Posts |
Posted - 2012-12-10 : 12:44:58
|
I have a customer who has NEVER moderated her comments. She has over 13,000 of them and 99.9% are spam. I tried this:SELECT FROM wp_comments WHERE comment_approved = 0planning to delete once I had gotten them all.But the error message I got was this: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM wp_comments WHERE comment_approved = 0 LIMIT 0, 30' at line 1Please tell me what I am doing wrong.Thanks so much! |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-12-10 : 12:51:15
|
You need to list the columns you want to select, or use a * for selecting all columnsSELECT col1,col2 FROM wp_comments WHERE comment_approved = 0-- or SELECT * FROM wp_comments WHERE comment_approved = 0 |
|
|
sharonejackson
Starting Member
3 Posts |
Posted - 2012-12-10 : 13:06:25
|
Thank you! I knew I was missing something critical but simple! I appreciate your help very much. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-12-14 : 02:05:18
|
Also in future you may be better off trying out in some MySQL forums if issue with MySQL specific syntax. This is MS SQL Server forum and we deal most;y with Transact SQL------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
sharonejackson
Starting Member
3 Posts |
Posted - 2012-12-14 : 16:46:03
|
quote: Originally posted by visakh16 Also in future you may be better off trying out in some MySQL forums if issue with MySQL specific syntax. This is MS SQL Server forum and we deal most;y with Transact SQL
My apologies, I thought I was in the right forum. I see now that I am not. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-12-15 : 12:19:36
|
No problemsJust reminded you ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|