|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
string
hi,
is there anybody who has some nice and useful query for the following problem: i'd like to trim some text that is stored in a database as blob and i'd like to have a certain part of it. the word or text is between an '=' and an '&'. thanx in advance |
|
#2
|
||||
|
||||
|
RE: string
Try something like this:
Code:
SELECT SUBSTRING(column, LOCATE('=', column)+1, LENGTH(column)-LOCATE('&', REVERSE(column))-LOCATE('=', column)) FROM table
That should select the part of "column" between the first '=' to the last '&'. You should add some checks to make sure those characters are in the string and I might be off a character or two in my length calculation, so you may need to add or subtract a constant. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > string |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|