| | |
how to query the first 4 letters and the last 4 letters of field
Please support our MySQL advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Jan 2008
Posts: 141
Reputation:
Solved Threads: 19
Quickest option, although it isn't restricted to only four characters would be to:
For a more precise solution, I would look to use MySQL regular expressions.
Hope this helps,
R.
sql Syntax (Toggle Plain Text)
SELECT * FROM `example` WHERE `content` LIKE 'AAAA%' OR `content` LIKE '%DDDD';
For a more precise solution, I would look to use MySQL regular expressions.
Hope this helps,
R.
•
•
Join Date: Jul 2009
Posts: 128
Reputation:
Solved Threads: 16
http://dev.mysql.com/doc/refman/5.0/...mmary-ref.html
I SOLVEd MY PROBLEM...thank you
use left and right :-)
I SOLVEd MY PROBLEM...thank you
use left and right :-)
Last edited by phpbeginners; Aug 20th, 2009 at 8:07 am.
![]() |
Similar Threads
- how to delete duplicate record in a table by using SQL query (MS SQL)
- writing a loop with letters not numbers (Python)
- Help me with this msql query! (PHP)
- prolem with sorting data in query based on date field (MySQL)
- Querying a Calculated Field? (MS Access and FileMaker Pro)
- Comparing two letters in one string with another char string? (C)
- error handling in VB6 + + ODBC + MySQL...(Help!!!!) (Visual Basic 4 / 5 / 6)
- Counting the amount of letters in a phrase! (C++)
Other Threads in the MySQL Forum
- Previous Thread: MySQL query ignoring "ORDER BY" clause?
- Next Thread: Error connecting to mysql
Views: 464 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for MySQL
"use" 1 amazon api aws bizspark breathalyzer changingprices cmg communityjournalism contentmanagement contractors copyright count court crm data database design developer development distinct drupal dui ec2 eliminate email enterprise eudora facebook form foss gartner gnu government gpl groklaw groupware hiring hyperic images innerjoins insert ip joebrockmeier journalism keyword keywords kickfire laptop law legal license licensing linux managing mariadb matchingcolumns metron micromanage microsoft microsoftexchange mindtouch montywidenius mozilla multiple mysql mysqlcolumnupdating mysqlindex mysqlinternalqueries mysqlsearch news opendatabasealliance opengovernment opensource operand oracle pdf penelope php priceupdating query referencedesign remove reorderingcolumns resultset search select simpledb sourcecode spotify sql statement sugarcrm syntax techsupport thunderbird transparency update virtualization





