如果你的地区字段有规则的话,sql里用substr就可以取啊!楼上的是杭州的? 有空联系[email protected]

解决方案 »

  1.   

    string temp="浙江省杭州市西湖区";
    string[] temp1=temp.Split('省');
    string[] temp2=temp1[1].Split('市');
    string[] temp3=temp2[1].Split('区');
    跟踪结果:
    temp1[0]=浙江
    temp2[0]=杭州
    temp3[0]=西湖
      

  2.   

    string s = "浙江省杭州市西湖区";
    string s1 = s.Substring(0,3);
    string s2 = s.Substring(3,3);
    string s3 = s.Substring(6,3);
      

  3.   

    string[] 4=temp3[1].Split('自治区');不就OK了
      

  4.   

    string s = "浙江省杭州市西湖区";
    string s1 = s.Substring(0,3);
    string s2 = s.Substring(3,3);
    string s3 = s.Substring(6,3);
      

  5.   

    string s = "浙江省杭州市西湖区";
    string s1 = s.Substring(0,3);
    string s2 = s.Substring(3,3);
    string s3 = s.Substring(6,3);