how to write sql script to achieve the following

Posted by 3nigma on Stack Overflow See other posts from Stack Overflow or by 3nigma
Published on 2011-01-29T14:36:12Z Indexed on 2011/01/29 15:26 UTC
Read the original article Hit count: 249

hi,

so i have a table lets say call it "tbl.items" and there is a column "title" in "tbl.items" i want to loop through each row and for each "title" in "tbl.items" i want to do following: the column has the datatype nvarchar(max) and contains a string...

  1. filter the string to remove words like in,out, where etc (stopwords)
  2. compare the rest of the string to a predefined list and if there is a match perform some action which involves inserting data in other tables as well..

the problem is im ignotent when it comes to writing T-sql scripts, plz help and guide me how can i achieve this? whether it can be achieved by writing a sql script?? or i have to develope a console application in c# or anyother language??

im using mssql server 2008

thanks in advance

© Stack Overflow or respective owner

Related posts about sql

Related posts about tsql