• 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.