Thomas Born
going with the flow Posts:78
|
04-13-2010 04:25 AM |
|
Hi;
I just purchased the latest version of the collection and tried to install DUD, however the install process fails with the error message below. Note I am running SQL Server 2005 and I have also checked the compatibilty level of the database which is set to 2005.
Can you pls advise how I can complete the upgrade!
(I am also still running 4.9.2)
Failure |
SQL Execution resulted in following Exceptions: System.Data.SqlClient.SqlException: Incorrect syntax near '@LimitResults'. Incorrect syntax near '@LimitResults'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) ALTER Procedure dbo.[dnn_DataSprings_RetrieveDNNUserProfileData3] (@PortalID int,@RoleFilter nvarchar(1000),@LimitResults nvarchar(100),@Authonly int,@Filter nvarchar(4000)) AS BEGIN if exists(select top 1 * from sysobjects where xtype = 'U' and name = 'tempDUDProfile') and (@PortalID = 999) begin drop table dbo.tempDUDProfile end if exists(select top 1 * from sysobjects where xtype = 'U' and name = 'tempDUDPivot') and (@PortalID = 999) begin drop table dbo.tempDUDPivot end -- generate tempDUDProfile table -- create table tempDUDProfile if not exists If not exists(select top 1 * from sysobjects where xtype = 'U' and name = 'tempDUDProfile') BEGIN select U.userid,U.username,U.firstname,U.lastname,U.email,U.Displayname,UP.propertyvalue, P.propertyname, P.PortalID into dbo.tempDUDProfile from dbo.[dnn_Users] U inner join dbo.[dnn_userprofile] UP on U.userid = UP.userid inner join dbo.[dnn_profilepropertydefinition] P on UP.propertydefinitionid = P.propertydefinitionid --where U.userid In (Select userid from dbo.[dnn_UserPortals] where PortalID = Convert(varchar(3), @PortalID)) where P.Visible=1 --AND P.PortalID = @PortalID AND P.Deleted=0 AND P.PRopertyName <> 'FirstName' AND P.PropertyName <> 'LastName' AND P.PRopertyNAme <> 'E-Mail' AND P.PRopertyNAme <> 'Email' AND P.PRopertyNAme <> 'Username' AND P.PRopertyNAme <> 'Displayname' AND P.PropertyName Not Like '%[.#)(&[@!^!]]%' ESCAPE '!' exec dbo.[dnn_DataSprings_RetrieveDNNUserProfileData3a] END If (@PortalID <> 999) BEGIN Declare @MySQL nvarchar(max) -- check if DNN version is 5.0 or higher if exists (select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME like '%userportals%' and COLUMN_NAME = 'IsDeleted') BEGIN Set @MySQL = 'select ' @LimitResults ' A.* from dbo.tempDUDPivot AS A' ' inner join aspnet_users AS B on B.username = A.username inner join aspnet_membership C on B.userid = C.userid ' replace(@Filter,'[','A.[') replace(@RoleFilter,'[','A.[') ' AND ((C.IsApproved = 1) OR (' Cast(@AuthOnly as varchar(2)) ' = 0))' ' AND A.PortalID = ' cast(@PortalID as varchar(3)) ' AND A.userid not in (select userid from dbo.[dnn_userportals] where isdeleted = 1 AND portalID = ' cast(@PortalID as varchar(3)) ')' EXECUTE(@MySQL) END else -- if DNN version is lower than 5.0 BEGIN Set @MySQL = 'select ' @LimitResults ' A.* from dbo.tempDUDPivot AS A' ' inner join aspnet_users AS B on B.username = A.username inner join aspnet_membership C on B.userid = C.userid ' replace(@Filter,'[','A.[') replace(@RoleFilter,'[','A.[') ' AND ((C.IsApproved = 1) OR (' Cast(@AuthOnly as varchar(2)) ' = 0))' ' AND A.PortalID = ' cast(@PortalID as varchar(3)) '' EXECUTE(@MySQL) END --PRINT(@MySQL) END END System.Data.SqlClient.SqlException: Incorrect syntax near ',['. Incorrect syntax near '@columns'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) CREATE Procedure dbo.[dnn_DataSprings_RetrieveDNNUserProfileData3a] AS BEGIN DECLARE @columns VARCHAR(8000) SELECT @columns = COALESCE(@columns ',[' cast(propertyname as varchar) ']', '[' cast(propertyname as varchar) ']') FROM dbo.tempDUDProfile GROUP BY propertyname DECLARE @query VARCHAR(8000) SET @query = ' SELECT * INTO dbo.tempDUDPIVOT FROM dbo.tempDUDProfile PIVOT ( MAX(propertyvalue) FOR [propertyname] IN (' @columns ') ) AS p ' EXECUTE(@query) END |
Failure |
SQL Execution resulted in following Exceptions: System.Data.SqlClient.SqlException: Incorrect syntax near '@LimitResults'. Incorrect syntax near '@LimitResults'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) ALTER Procedure dbo.[dnn_DataSprings_RetrieveDNNUserProfileData3] (@PortalID int,@RoleFilter nvarchar(1000),@LimitResults nvarchar(100),@Authonly int,@Filter nvarchar(4000)) AS BEGIN if exists(select top 1 * from sysobjects where xtype = 'U' and name = 'tempDUDProfile') and (@PortalID = 999) begin drop table dbo.tempDUDProfile end if exists(select top 1 * from sysobjects where xtype = 'U' and name = 'tempDUDPivot') and (@PortalID = 999) begin drop table dbo.tempDUDPivot end -- generate tempDUDProfile table -- create table tempDUDProfile if not exists If not exists(select top 1 * from sysobjects where xtype = 'U' and name = 'tempDUDProfile') BEGIN select U.userid,U.username,U.firstname,U.lastname,U.email,U.Displayname,UP.propertyvalue, P.propertyname, P.PortalID into dbo.tempDUDProfile from dbo.[dnn_Users] U inner join dbo.[dnn_userprofile] UP on U.userid = UP.userid inner join dbo.[dnn_profilepropertydefinition] P on UP.propertydefinitionid = P.propertydefinitionid --where U.userid In (Select userid from dbo.[dnn_UserPortals] where PortalID = Convert(varchar(3), @PortalID)) where P.Visible=1 --AND P.PortalID = @PortalID AND P.Deleted=0 AND P.PRopertyName <> 'FirstName' AND P.PropertyName <> 'LastName' AND P.PRopertyNAme <> 'E-Mail' AND P.PRopertyNAme <> 'Email' AND P.PRopertyNAme <> 'Username' AND P.PRopertyNAme <> 'Displayname' AND P.PropertyName Not Like '%[.#)(&[@!^!]]%' ESCAPE '!' exec dbo.[dnn_DataSprings_RetrieveDNNUserProfileData3a] END If (@PortalID <> 999) BEGIN Declare @MySQL nvarchar(max) -- check if DNN version is 5.0 or higher if exists (select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME like '%userportals%' and COLUMN_NAME = 'IsDeleted') BEGIN Set @MySQL = 'select ' @LimitResults ' A.* from dbo.tempDUDPivot AS A' ' inner join aspnet_users AS B on B.username = A.username inner join aspnet_membership C on B.userid = C.userid ' replace(@Filter,'[','A.[') replace(@RoleFilter,'[','A.[') ' AND ((C.IsApproved = 1) OR (' Cast(@AuthOnly as varchar(2)) ' = 0))' ' AND A.PortalID = ' cast(@PortalID as varchar(3)) ' AND A.userid not in (select userid from dbo.[dnn_userportals] where isdeleted = 1 AND portalID = ' cast(@PortalID as varchar(3)) ')' EXECUTE(@MySQL) END else -- if DNN version is lower than 5.0 BEGIN Set @MySQL = 'select ' @LimitResults ' A.* from dbo.tempDUDPivot AS A' ' inner join aspnet_users AS B on B.username = A.username inner join aspnet_membership C on B.userid = C.userid ' replace(@Filter,'[','A.[') replace(@RoleFilter,'[','A.[') ' AND ((C.IsApproved = 1) OR (' Cast(@AuthOnly as varchar(2)) ' = 0))' ' AND A.PortalID = ' cast(@PortalID as varchar(3)) '' EXECUTE(@MySQL) END --PRINT(@MySQL) END END System.Data.SqlClient.SqlException: Incorrect syntax near ',['. Incorrect syntax near '@columns'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) CREATE Procedure dbo.[dnn_DataSprings_RetrieveDNNUserProfileData3a] AS BEGIN DECLARE @columns VARCHAR(8000) SELECT @columns = COALESCE(@columns ',[' cast(propertyname as varchar) ']', '[' cast(propertyname as varchar) ']') FROM dbo.tempDUDProfile GROUP BY propertyname DECLARE @query VARCHAR(8000) SET @query = ' SELECT * INTO dbo.tempDUDPIVOT FROM dbo.tempDUDProfile PIVOT ( MAX(propertyvalue) FOR [propertyname] IN (' @columns ') ) AS p ' EXECUTE(@query) END |
Failure |
SQL Execution resulted in following Exceptions: System.Data.SqlClient.SqlException: Incorrect syntax near '@LimitResults'. Incorrect syntax near '@LimitResults'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) ALTER Procedure dbo.[dnn_DataSprings_RetrieveDNNUserProfileData3] (@PortalID int,@RoleFilter nvarchar(1000),@LimitResults nvarchar(100),@Authonly int,@Filter nvarchar(4000)) AS BEGIN if exists(select top 1 * from sysobjects where xtype = 'U' and name = 'tempDUDProfile') and (@PortalID = 999) begin drop table dbo.tempDUDProfile end if exists(select top 1 * from sysobjects where xtype = 'U' and name = 'tempDUDPivot') and (@PortalID = 999) begin drop table dbo.tempDUDPivot end -- generate tempDUDProfile table -- create table tempDUDProfile if not exists If not exists(select top 1 * from sysobjects where xtype = 'U' and name = 'tempDUDProfile') BEGIN select U.userid,U.username,U.firstname,U.lastname,U.email,U.Displayname,UP.propertyvalue, P.propertyname, P.PortalID into dbo.tempDUDProfile from dbo.[dnn_Users] U inner join dbo.[dnn_userprofile] UP on U.userid = UP.userid inner join dbo.[dnn_profilepropertydefinition] P on UP.propertydefinitionid = P.propertydefinitionid --where U.userid In (Select userid from dbo.[dnn_UserPortals] where PortalID = Convert(varchar(3), @PortalID)) where P.Visible=1 --AND P.PortalID = @PortalID AND P.Deleted=0 AND P.PRopertyName <> 'FirstName' AND P.PropertyName <> 'LastName' AND P.PRopertyNAme <> 'E-Mail' AND P.PRopertyNAme <> 'Email' AND P.PRopertyNAme <> 'Username' AND P.PRopertyNAme <> 'Displayname' AND P.PropertyName Not Like '%[.#)(&[@!^!]]%' ESCAPE '!' exec dbo.[dnn_DataSprings_RetrieveDNNUserProfileData3a] END If (@PortalID <> 999) BEGIN Declare @MySQL nvarchar(max) -- check if DNN version is 5.0 or higher if exists (select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME like '%userportals%' and COLUMN_NAME = 'IsDeleted') BEGIN Set @MySQL = 'select ' @LimitResults ' A.* from dbo.tempDUDPivot AS A' ' inner join aspnet_users AS B on B.username = A.username inner join aspnet_membership C on B.userid = C.userid ' replace(@Filter,'[','A.[') replace(@RoleFilter,'[','A.[') ' AND ((C.IsApproved = 1) OR (' Cast(@AuthOnly as varchar(2)) ' = 0))' ' AND A.PortalID = ' cast(@PortalID as varchar(3)) ' AND A.userid not in (select userid from dbo.[dnn_userportals] where isdeleted = 1 AND portalID = ' cast(@PortalID as varchar(3)) ')' EXECUTE(@MySQL) END else -- if DNN version is lower than 5.0 BEGIN Set @MySQL = 'select ' @LimitResults ' A.* from dbo.tempDUDPivot AS A' ' inner join aspnet_users AS B on B.username = A.username inner join aspnet_membership C on B.userid = C.userid ' replace(@Filter,'[','A.[') replace(@RoleFilter,'[','A.[') ' AND ((C.IsApproved = 1) OR (' Cast(@AuthOnly as varchar(2)) ' = 0))' ' AND A.PortalID = ' cast(@PortalID as varchar(3)) '' EXECUTE(@MySQL) END --PRINT(@MySQL) END END System.Data.SqlClient.SqlException: Incorrect syntax near ',['. Incorrect syntax near '@columns'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) CREATE Procedure dbo.[dnn_DataSprings_RetrieveDNNUserProfileData3a] AS BEGIN DECLARE @columns VARCHAR(8000) SELECT @columns = COALESCE(@columns ',[' cast(propertyname as varchar) ']', '[' cast(propertyname as varchar) ']') FROM dbo.tempDUDProfile GROUP BY propertyname DECLARE @query VARCHAR(8000) SET @query = ' SELECT * INTO dbo.tempDUDPIVOT FROM dbo.tempDUDProfile PIVOT ( MAX(propertyvalue) FOR [propertyname] IN (' @columns ') ) AS p ' EXECUTE(@query) END |
Failure SQL Execution resulted in following Exceptions: System.Data.SqlClient.SqlException: Incorrect syntax near '@LimitResults'. Incorrect syntax near '@LimitResults'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) ALTER Procedure dbo.[dnn_DataSprings_RetrieveDNNUserProfileData3] (@PortalID int,@RoleFilter nvarchar(1000),@LimitResults nvarchar(100),@Authonly int,@Filter nvarchar(4000)) AS BEGIN if exists(select top 1 * from sysobjects where xtype = 'U' and name = 'tempDUDProfile') and (@PortalID = 999) begin drop table dbo.tempDUDProfile end if exists(select top 1 * from sysobjects where xtype = 'U' and name = 'tempDUDPivot') and (@PortalID = 999) begin drop table dbo.tempDUDPivot end -- generate tempDUDProfile table -- create table tempDUDProfile if not exists If not exists(select top 1 * from sysobjects where xtype = 'U' and name = 'tempDUDProfile') BEGIN select U.userid,U.username,U.firstname,U.lastname,U.email,U.Displayname,UP.propertyvalue, P.propertyname, P.PortalID into dbo.tempDUDProfile from dbo.[dnn_Users] U inner join dbo.[dnn_userprofile] UP on U.userid = UP.userid inner join dbo.[dnn_profilepropertydefinition] P on UP.propertydefinitionid = P.propertydefinitionid --where U.userid In (Select userid from dbo.[dnn_UserPortals] where PortalID = Convert(varchar(3), @PortalID)) where P.Visible=1 --AND P.PortalID = @PortalID AND P.Deleted=0 AND P.PRopertyName <> 'FirstName' AND P.PropertyName <> 'LastName' AND P.PRopertyNAme <> 'E-Mail' AND P.PRopertyNAme <> 'Email' AND P.PRopertyNAme <> 'Username' AND P.PRopertyNAme <> 'Displayname' AND P.PropertyName Not Like '%[.#)(&[@!^!]]%' ESCAPE '!' exec dbo.[dnn_DataSprings_RetrieveDNNUserProfileData3a] END If (@PortalID <> 999) BEGIN Declare @MySQL nvarchar(max) -- check if DNN version is 5.0 or higher if exists (select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME like '%userportals%' and COLUMN_NAME = 'IsDeleted') BEGIN Set @MySQL = 'select ' @LimitResults ' A.* from dbo.tempDUDPivot AS A' ' inner join aspnet_users AS B on B.username = A.username inner join aspnet_membership C on B.userid = C.userid ' replace(@Filter,'[','A.[') replace(@RoleFilter,'[','A.[') ' AND ((C.IsApproved = 1) OR (' Cast(@AuthOnly as varchar(2)) ' = 0))' ' AND A.PortalID = ' cast(@PortalID as varchar(3)) ' AND A.userid not in (select userid from dbo.[dnn_userportals] where isdeleted = 1 AND portalID = ' cast(@PortalID as varchar(3)) ')' EXECUTE(@MySQL) END else -- if DNN version is lower than 5.0 BEGIN Set @MySQL = 'select ' @LimitResults ' A.* from dbo.tempDUDPivot AS A' ' inner join aspnet_users AS B on B.username = A.username inner join aspnet_membership C on B.userid = C.userid ' replace(@Filter,'[','A.[') replace(@RoleFilter,'[','A.[') ' AND ((C.IsApproved = 1) OR (' Cast(@AuthOnly as varchar(2)) ' = 0))' ' AND A.PortalID = ' cast(@PortalID as varchar(3)) '' EXECUTE(@MySQL) END --PRINT(@MySQL) END END System.Data.SqlClient.SqlException: Incorrect syntax near ',['. Incorrect syntax near '@columns'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) CREATE Procedure dbo.[dnn_DataSprings_RetrieveDNNUserProfileData3a] AS BEGIN DECLARE @columns VARCHAR(8000) SELECT @columns = COALESCE(@columns ',[' cast(propertyname as varchar) ']', '[' cast(propertyname as varchar) ']') FROM dbo.tempDUDProfile GROUP BY propertyname DECLARE @query VARCHAR(8000) SET @query = ' SELECT * INTO dbo.tempDUDPIVOT FROM dbo.tempDUDProfile PIVOT ( MAX(propertyvalue) FOR [propertyname] IN (' @columns ') ) AS p ' EXECUTE(@query) END
Thanks for your help
Thomas |
|
|
|
|