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 > mysqldump --where condition with LIKE operator

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-26-04, 08:15
lordsith2004 lordsith2004 is offline
Registered User
 
Join Date: Aug 2004
Posts: 2
Exclamation mysqldump --where condition with LIKE operator

Hi everybody,

Can anyone tell me how to use --where option of the mysqldump with LIKE operator?

I used something like this "--where=field1 LIKE 'prefix%'" but nothing seems to work.

I want to select for backup only those records that begin with string "prefix"

Command line works great if where condition is set for other fields like this:
--where=field2=3 (without any quotes) but I need an where clause like above.

Thanks for help! :
Reply With Quote
  #2 (permalink)  
Old 08-26-04, 08:49
lordsith2004 lordsith2004 is offline
Registered User
 
Join Date: Aug 2004
Posts: 2
Thumbs up Sorry... I've got the problem solved

Well in my case what I've forgot to mention is that the mysqldump command was placed in one batch file that was executed periodically. As you know (and I have been forgot) the percent sign is interpreted as a special character. To solve problem I put double percent sign "%%" instead of only one.

Best wishes,
Lord Sith
Reply With Quote
Reply

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