以空格为分割字符串就行了。using System;public class SplitTest {
public static void Main() { string words = "this is a list of words, with: a bit of punctuation."; string [] split = words.Split(new Char [] {' ', ',', '.', ':'}); foreach (string s in split) { if (s.Trim() != "")
Console.WriteLine(s);
}
}
}
public static void Main() { string words = "this is a list of words, with: a bit of punctuation."; string [] split = words.Split(new Char [] {' ', ',', '.', ':'}); foreach (string s in split) { if (s.Trim() != "")
Console.WriteLine(s);
}
}
}
我先给你个思路,然后我在去把运行的代码搞出来
首先把这个字段查出来放到一个临时表里,然后把这些值连接起来,中间用空格(或多个空格)分割.
然后用xquery查询,就能得到你想要的效果了,但是这样就涉及到一个效率的问题.首先来讲就是你看看是不是必须在数据库中查询出这样的结果.二来就是对效率的要求是什么级别.还有就是你要确定在同一个字段中的N个手机号之间是用什么分割的?所有的记录是不是都是这样分割的.
我一会把那个查询语句给你搞出来.
我只能想到这个办法,不知道别人了