开发者

sql server strip string

开发者 https://www.devze.com 2023-01-30 12:47 出处:网络
I have a table in SQL Server of strings that i need to inner join to another table that contains some similarity between 开发者_StackOverflowsubstrings, here i have an example: Intel Atom CPU N450 @ 1

I have a table in SQL Server of strings that i need to inner join to another table that contains some similarity between 开发者_StackOverflowsubstrings, here i have an example: Intel Atom CPU N450 @ 1.66GHz (INNER JOIN) Intel Atom N450@ 1.66GHz . I dont want use replace, i was thinking in something like using substring, pad, or something else. For example i wish to look for 'N450' on the other table. Could someone help me?


Check out CharIndex if you want to look for something in SQL Server.

Example:

Select * from YourTable where CharIndex('YourString', YourColumn) > 0

Relevant: http://msdn.microsoft.com/en-us/library/ms186323.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消