Sql select rows containing part of string.

Posted by Maxim on Stack Overflow See other posts from Stack Overflow or by Maxim
Published on 2010-04-12T11:19:15Z Indexed on 2010/04/12 11:23 UTC
Read the original article Hit count: 231

Filed under:

Hello! I want to write a comparation procedure (t-sql) for site seo.

I have a table with field 'url' (nvarchar()) that contain a part of site url's. Ex: 'mysyte.com/?id=2'. Also this table for each url contains metadata, that i need to extract.

The main problem is that full url on site looks like 'mysyte.com/?id=2&region=0&page=1', and i just need to ignore everething, except url in table:

I mean: 'mysyte.com/?id=2' => is a part of 'mysyte.com/?id=2&region=0&page=1'

© Stack Overflow or respective owner

Related posts about sql