STUFF IN MS SQL, Getting data from table in a single row separated by comma or other sign

Consider following SQL statement for MS SQL Select UserName from UserInfo It will return UserName Anis Hasibul If you want to get these record in following way UserName Anis, Hasibul Then you have to use STAFF Consider following example of staff for getting above data SELECT STUFF ( (Select TOP 100 PERCENT ‘,’ + UserName

Read More

The maximum report processing jobs limit configured by your system administrator has been reached

This is very common error (“maximum report processing jobs limit”) when crystal report printing job limit over We can solve this problem using two way: 1. Need to write following code on CrystalReportViewer Unload event a. Perform reportDocument Deispose b.Perform reportDocument Clone c.Perform reportDocument Close d. Perform CrystalReportViewer Dispose Code ============ //Declare ReportDocument as a

Read More

Difference between Variable Table(@) and Temp(#) table

Table variables are Transaction neutral. They are variables and thus aren’t bound to a transaction. Temp tables behave same as normal tables and are bound by transactions. Consider Following Example —————————————– BEGIN TRAN declare @var table (id int, data varchar(20) ) create table #temp (id int, data varchar(20) ) insert into @var select 1, ‘data

Read More