Using MySQL how can you select only the first 30 characters of a text field?
I actually have a text field in a mysql database and only want to return the first 30 characters into a variable....
SELECT LEFT( <field name>, 30 ) FROM tablename WHERE...
tablename
-Marc
can i use "LEFT( <field name>, 30 )" to remove parts of a field for example:
D-41578, D-78654 will become 41578, 78654
I would guess you would have to use RIGHT, not Left...
Thanks...That did the job.....
Ok, my question was to build a delete/update query like
UPDATE table SET field = RIGHT(field, 5) WHERE field like '%D-'
this left comand will not work for me...