Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

usp_TransposeNRows v2.0 Expand / Collapse
Author
Message
Posted Friday, January 29, 2010 5:07 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, February 11, 2013 8:24 AM
Points: 1, Visits: 151
Comments posted to this topic are about the item usp_TransposeNRows v2.0
Post #856492
Posted Wednesday, February 17, 2010 2:44 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, April 09, 2014 1:54 AM
Points: 28, Visits: 56
Hi, thanx for the contribution, this sounds good...

There are still some problems though, try following:

create table dbo.Something(
ID int identity(1,1) not null,
NVarCharValue nvarchar(50) null,
DateTimeValue datetime null
)
go

insert into dbo.Something (NVarCharValue, DateTimeValue) values ('1', null)
insert into dbo.Something (NVarCharValue, DateTimeValue) values ('2', null)
insert into dbo.Something (NVarCharValue, DateTimeValue) values ('71111111111', null)
insert into dbo.Something (NVarCharValue, DateTimeValue) values ('abc', null)
insert into dbo.Something (NVarCharValue, DateTimeValue) values ('xxxx', getdate())
insert into dbo.Something (NVarCharValue, DateTimeValue) values ('yyy', null)
insert into dbo.Something (NVarCharValue, DateTimeValue) values ('zzz', null)
go

select * from dbo.Something

exec dbo.usp_TransposeNRows 'Something',10

I will try to analyse where the problem is...

Cheers, Richard.
Post #866831
Posted Wednesday, February 17, 2010 6:23 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, February 11, 2013 8:24 AM
Points: 1, Visits: 151
Richard,

Thanks for your test case, and for offering to look into the issue.
I've done a quick check - the problem appears to be with the NULL values.
I'll dig further and post a fix soon.

Jeff
Post #866962
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse