tag:blogger.com,1999:blog-7912296204981212049.comments2023-04-30T14:23:42.631+05:30www.DatabaseWala.comMSSQL,SSIS Solutionhttp://www.blogger.com/profile/08941202893065935709noreply@blogger.comBlogger58125tag:blogger.com,1999:blog-7912296204981212049.post-14201678937566617192016-10-22T09:46:57.936+05:302016-10-22T09:46:57.936+05:30I need query for same scenario with out using wind...I need query for same scenario with out using windows functions. Thank You in advance..!!!Anonymoushttps://www.blogger.com/profile/02042817036654989548noreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-6254044409206899772016-03-11T00:14:10.500+05:302016-03-11T00:14:10.500+05:30Nice article,good workNice article,good workAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-9458331255570029012016-01-10T19:27:38.344+05:302016-01-10T19:27:38.344+05:30I am getting error like profile name is not valid,...I am getting error like profile name is not valid,,..please give me suggestionfreetips4uhttps://www.blogger.com/profile/08105957265358296855noreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-81606515992127640372016-01-10T14:34:35.129+05:302016-01-10T14:34:35.129+05:30Can we use datepart function instead of datename?
...Can we use datepart function instead of datename?<br />Select datepart(year,getdate())freetips4uhttps://www.blogger.com/profile/08105957265358296855noreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-83851199381235847802015-06-27T11:54:34.685+05:302015-06-27T11:54:34.685+05:30Thanks for the FANTASTIC post!
active collagen re...Thanks for the FANTASTIC post! <br /><a href="http://www.nationalnutrition.ca/" rel="nofollow">active collagen reviews</a><br /><a href="http://www.nationalnutrition.ca/" rel="nofollow">active collagen supplements</a><br /><a href="http://www.nationalnutrition.ca/" rel="nofollow">Buy Lorna Vanderhaeghe</a><br /><a href="http://www.nationalnutrition.ca/" rel="nofollow">Buy Lorna Vanderhaeghe Estrosmart</a><br /><a href="http://www.nationalnutrition.ca/" rel="nofollow">Buy Lorna Vanderhaeghe Supplements</a><br /><a href="http://www.nationalnutrition.ca/" rel="nofollow">Lorna Vanderhaeghe Active Collagen</a><br /><a href="http://www.nationalnutrition.ca/" rel="nofollow">lorna vanderhaeghe estrosmart</a><br /><a href="http://www.nationalnutrition.ca/" rel="nofollow">lorna vanderhaeghe health products</a>Willson Rouhttps://www.blogger.com/profile/01346915664825434019noreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-68770930598465939162015-01-23T14:24:25.972+05:302015-01-23T14:24:25.972+05:30Good day,
I have a question, created a unpivot a...Good day,<br /><br />I have a question, created a unpivot and i want the result of the unpivot the way i created a select before creating the unpivot, coz my result now is sorter alphabetically<br /><br />thanksRajan Arash Jameshttps://www.blogger.com/profile/06605257599065341624noreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-46492065548768446772014-09-23T12:18:57.854+05:302014-09-23T12:18:57.854+05:30Hi Sandeep, How to add colours based on value in y...Hi Sandeep, How to add colours based on value in your same code? Like for example for true background color should be red and for false it should be blue like that.<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-48827593614079158472014-04-11T19:40:54.698+05:302014-04-11T19:40:54.698+05:30What's up everyone, it's my first go to se...What's up everyone, it's my first go to see at <br />this site, annd post iss genuinely fruitful for me, keep up <br />posting these types of artickes or reviews.<br /><br /><br />Stop bby my homwpage :: TK (<a href="http://www.pendock.co.uk/Pipe_Boxing_~_Ducting/Products/Pendock_Profiles_-Service_Enclosures_(pipe_boxing)/MX_~_CH_Pipe_Casing_and_Service_Systems/MX_Type_A/Default.aspx?id=487" rel="nofollow">www.pendock.co.uk</a>)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-62959811005306657682014-02-26T21:48:35.613+05:302014-02-26T21:48:35.613+05:30for your better understandiing create table color...for your better understandiing create table color by using columns (comid ,id ,names )<br />and use below query<br /><br />declare @allrecord varchar(max)<br />declare @finaltable nvarchar(MAX)<br />declare @header nvarchar(max)<br />----------This is only for display header row (column Name) -------<br />set @header ='<'tr bgcolor="#FF0000"> <'th> ID <'th> Emp_Name <'th> salary '<br />----------this is for actual data rows-----------------------<br />set @allrecord = cast(( select [comid] AS 'td','',[id] AS 'td','',<br />[Names] AS 'td',''<br />from color where id >0 order by ID <br />for XML PATH('tr'), ELEMENTS ) as nvarchar(MAX))<br />------------------------this is final table --------------------<br />set @finaltable ='<'table border="1">'+@header +@allrecord+ ''<br />print @finaltable<br />MSSQL,SSIS Solutionhttps://www.blogger.com/profile/08941202893065935709noreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-19297813057302642652014-02-26T14:55:56.766+05:302014-02-26T14:55:56.766+05:30`Declare @a varchar(max)
Declare @b varchar(max)
... `Declare @a varchar(max)<br /> Declare @b varchar(max)<br /><br /> set @a = cast(( <br /> SELECT td = f1, '', td = f2 , '' from tablenme Where f2 is null order by f1<br /> for XML PATH('tr'), ELEMENTS )AS nvarchar(max)) <br /><br /> "set @b ='<br /> <br /> Stayed on the list<br /> f1 <br /> f2 <br /> '"<br /><br /> set @b = @b + @a +''<br /><br /> Print @b'<br /><br />I want to get the total select stmt used in above code from a table field.<br /><br />`SELECT td = f1, '', td = f2 , '' from tablenme Where f2 is null order by f1`<br /><br />Note: i have changed the html tags as this site is not accepting Anonymoushttps://www.blogger.com/profile/08366279260772263966noreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-29709643709038355002014-02-25T20:11:05.805+05:302014-02-25T20:11:05.805+05:30hi Marc rim,use below statement to attach td to yo...hi Marc rim,use below statement to attach td to your column data ,replace column name and table name from below statement with your table and column name . for better understanding check step 2 in current post<br /> <br /> declare @xmlnvarchar(MAX)<br /> declare @body nvarchar(MAX)<br /> set @xml = cast(( select [ID] AS 'td','',[Emp_Name] AS 'td','',<br /> [salary] AS 'td','', department AS 'td'<br /> from #Temp order by ID <br /> for XML PATH('tr'), ELEMENTS ) ASnvarchar(MAX)) MSSQL,SSIS Solutionhttps://www.blogger.com/profile/08941202893065935709noreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-24849432527743615072014-02-25T10:53:27.207+05:302014-02-25T10:53:27.207+05:30HI sandip, I want get the 'select statement...HI sandip, I want get the 'select statement' from a table column , so then how can i attach 'td' to the stmtAnonymoushttps://www.blogger.com/profile/08366279260772263966noreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-44610284029208963472014-02-08T11:55:01.898+05:302014-02-08T11:55:01.898+05:30you can use below script for creating company tabl...you can use below script for creating company table<br />-------------------------------------------------------------<br />create table company(comid int, comname varchar(100))<br /> <br /> insert into company (comid,comname) values (1,'asian')<br /> insert into company (comid,comname) values (2,'india paints')<br /> insert into company (comid,comname) values (2,'colursPaints')<br />-----------------------------------------------------------------------<br />create comdetail table by using below script<br />----------------------------------------------------------------------------------<br /> select * into comdetail from ( select comname,Names,Quantity from color a inner join company c on<br /> c.comid=a.comid inner join Quantity b on a.id=b.id )<br /> DataTable PIVOT ( SUM(Quantity) FOR Names IN ( black,red,Grey,wt,re ) ) PivotTable<br />---------------------------------------------------------------------------------------------------MSSQL,SSIS Solutionhttps://www.blogger.com/profile/08941202893065935709noreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-45988607837932869872014-02-06T10:02:06.890+05:302014-02-06T10:02:06.890+05:30What are the column that are used in the creation ...What are the column that are used in the creation of the company table and commdetail tablesudaykiranhttps://www.blogger.com/profile/16879876950682579283noreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-62894933879716950272014-01-30T21:58:33.999+05:302014-01-30T21:58:33.999+05:30you can try Forward Only Cursors .you can try Forward Only Cursors .MSSQL,SSIS Solutionhttps://www.blogger.com/profile/08941202893065935709noreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-69260487694635334332014-01-30T08:59:31.987+05:302014-01-30T08:59:31.987+05:30declare @ID INT
declare @lastname VARCHAR(255)
dec...declare @ID INT<br />declare @lastname VARCHAR(255)<br />declare @fname VARCHAR(255)<br /> declare @copy CURSOR<br />set @copy = CURSOR for <br />select personID,LastName,FirstName FROM Persons<br /><br />open @copy<br />fetch next from @copy into @ID ,@lastname,@fname<br /> while @@FETCH_STATUS = 0<br /> begin<br /> begin try<br /> insert into Persons2 values(@ID,@lastname,@fname)<br /> print 'Inserted'<br /> end try<br /> begin catch<br /> print 'not inseted'<br /> end catch<br /> end<br /> close @copy<br /> deallocate @copy <br /><br /> <br /><br />this is my code .it is taking to long to execute Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-72736267858468234182014-01-23T16:06:00.986+05:302014-01-23T16:06:00.986+05:30Nice ArticleNice ArticleAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-68483951321249484222014-01-23T13:43:29.023+05:302014-01-23T13:43:29.023+05:30thanks
very usefulthanks<br />very usefulAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-67170472766482357652014-01-02T15:52:47.917+05:302014-01-02T15:52:47.917+05:30Nice1...Nice1...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-71565850823033933292013-12-27T11:58:24.393+05:302013-12-27T11:58:24.393+05:30Nice......may i get simplest examples of above men...Nice......may i get simplest examples of above mentioned cursor's....which will explain with more simply... :) 'hrihaan77777@gmail.com'Anonymousnoreply@blogger.comtag: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-89662959982478963422013-11-20T12:00:23.620+05:302013-11-20T12:00:23.620+05:30use full article thank you,,,,,,,use full article thank you,,,,,,,Anjireddyhttps://www.blogger.com/profile/11479866038521904967noreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-71909650148614256322013-11-16T15:54:14.612+05:302013-11-16T15:54:14.612+05:30This post is truly a fastidious one it helps new i...This post is truly a fastidious one it helps new internet viewers, who are wishing in favor of blogging.<br /><br /><br />my page <a href="http://automated-income-app-review.partnerwithtomreview.co/" rel="nofollow">Automated Income App Review</a>Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7912296204981212049.post-55244763136345473092013-10-23T17:20:52.866+05:302013-10-23T17:20:52.866+05:30 you create simple store procedure .for your unde... you create simple store procedure .for your understanding go step by step.you replace column name ,table name ,and credentials of mail sending profile .MSSQL,SSIS Solutionhttps://www.blogger.com/profile/08941202893065935709noreply@blogger.com