Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Full text search

Author  Topic 

browndog
Starting Member

4 Posts

Posted - 2004-11-24 : 15:03:29
Hi I am new to stored procs and t-sql but I am trying to select a portion of a text field. I have seen bol and other resources show examples of PATINDEX AND TEXTPTR AND SUBSTRING. My question is: Is there a way to use the value returned by PATINDEX AS THE STARTING POSITION FOR THE SUBSTRING STARTING POSITION? I.E. in my text field (somewhere) is the word "serial" with a number following directly after like "serial 098765". I am using this for a stored Proceedure that is the record source of an access project form but it could be a report if needed. The table is full-text indexed. Thanks for any help you can provide.

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-11-25 : 02:33:59
quote:
Originally posted by browndog

Hi I am new to stored procs and t-sql but I am trying to select a portion of a text field. I have seen bol and other resources show examples of PATINDEX AND TEXTPTR AND SUBSTRING. My question is: Is there a way to use the value returned by PATINDEX AS THE STARTING POSITION FOR THE SUBSTRING STARTING POSITION? I.E. in my text field (somewhere) is the word "serial" with a number following directly after like "serial 098765". I am using this for a stored Proceedure that is the record source of an access project form but it could be a report if needed. The table is full-text indexed. Thanks for any help you can provide.



try charindex

--------------------
keeping it simple...
Go to Top of Page
   

- Advertisement -