高分求助SQL语句写法(t表中一字段中内容如:a,b,c,d。如何分别取出各值)

日期:2012-01-06 09:55:09 人气:2

高分求助SQL语句写法(t表中一字段中内容如:a,b,c,d。如何分别取出各值)

这个要用自定义函数了 比如象你的就是select split(字段名,',',0) as 字段1,split(字段名,',',1) as 字段2 ... CREATE FUNCTION [dbo].[split] (@str nvarchar(4000),@code varchar(10),@no int ) RETURNS varchar(200) AS BEGIN declare @intLen int declare @count int declare
    A+
热门评论