tag:blogger.com,1999:blog-7912296204981212049.post8788815075172200245..comments2023-04-30T14:23:42.631+05:30Comments on www.DatabaseWala.com: pivot without aggregate function in sql serverMSSQL,SSIS Solutionhttp://www.blogger.com/profile/08941202893065935709noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-7912296204981212049.post-61477163787967327292013-12-21T20:08:03.092+05:302013-12-21T20:08:03.092+05:30Refer below link to create split function,a split ...Refer below link to create split function,a split function return table with id column. <br /><br />http://sandipgsql.blogspot.in/2013/06/split-funtions-in-sql-server.htmlMSSQL,SSIS Solutionhttps://www.blogger.com/profile/08941202893065935709noreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-1996525829536642382013-12-10T11:53:32.340+05:302013-12-10T11:53:32.340+05:30Hi Sandeep,
I followed all above steps, including...Hi Sandeep,<br /><br />I followed all above steps, including createing the dbo.SplitString function.<br /><br />Still getting below error in sql server 2008R2:-<br /><br />---------------------------------------------<br />Msg 207, Level 16, State 1, Line 66<br />Invalid column name 'id'.<br />Msg 207, Level 16, State 1, Line 81<br />Invalid column name 'id'.<br />Msg 207, Level 16, State 1, Line 91<br />Invalid column name 'id'.<br />Msg 207, Level 16, State 1, Line 102<br />Invalid column name 'id'.<br />Msg 207, Level 16, State 1, Line 112<br />Invalid column name 'id'.<br />---------------------------------------------Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-90554939100256018032013-07-27T09:33:57.884+05:302013-07-27T09:33:57.884+05:30you need to create function dbo.SplitString() .
...you need to create function dbo.SplitString() .<br /><br />Refer below link to create function<br /><br />http://sandipgsql.blogspot.in/2013/06/split-funtions-in-sql-server.htmlMSSQL,SSIS Solutionhttps://www.blogger.com/profile/08941202893065935709noreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-23536537876102132842013-07-27T03:47:38.022+05:302013-07-27T03:47:38.022+05:30Hello!
When I copy your code and run it, I get err...Hello!<br />When I copy your code and run it, I get errors:<br />Invalid column name 's'.<br />Invalid column name 'id'.<br /><br />The errors refer to the line:<br />select * from dbo.SplitString(@str,',')) tab pivot (min(s) for id in([0],[1],[2],[3]) )data<br /><br />It seems something is missing...?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-1990134187614017072013-07-23T09:41:00.361+05:302013-07-23T09:41:00.361+05:30give me details about dbo.splitstring
table give me details about dbo.splitstring<br />table Anonymousnoreply@blogger.com