Query portions of a text field

  • Thread starter Thread starter Ryan Langton
  • Start date Start date
R

Ryan Langton

I have a text field - nvarchar(1000) - that I want to query for just
portions of the text. In the text fields, there are notations enclosed in
square brackets, for example, one record may contain -
"[10/5/2005 9:50am ryan] Called rep - scheduled appt"

On a certain form I want the text to be displayed but I don't want to see
all the info within the square brackets, so the query should just result
in -
"Called rep - scheduled appt"

Is there any way to do this?

Thanks,
Ryan
 
SELECT substring(TextFieldName, charindex(']', FieldName) + 1, 1000) FROM
TableName
 
Back
Top