Transpose Rows to Columns
I have the table with this information. No. CPR Name Modules 1 80000 SS TT1 1 80000 SS TT2 1 80000 SS TT3 2 52222 MM TTMd 2 52222 MM TTGH 3 6666 BB YUH 3 6666 BB BBG I want the data to be transpose as...
View ArticleCannot able to set email alert for high cpu usage alert in sql server
![alt text][1] email will trigger if i set falls below option but if i select rises above option it does not send emails i want to set email alert if cpu utilization goes to 60% and above (sql server...
View ArticleInsert multiple column from one table into two coloums in another table
i have a tablename called emp EmpID Amount Empid1 Amount1 Empid2 Amount2 Empid3 Amount3 1 2000 2 2000 3 2000 4 2000 1 1500 2 1500 3 1500 4 3500 1 1000 2 1000 3 1000 4 1000 need to insert this table...
View ArticleGender count for employees based on experience in incremental order
i have a table name 'users' with columns username ,userid,gender ,joiningdate i want report for male female gender count for based on joining date 0-6months,6-12months,1-2 years,2-3 years,4-5...
View ArticleFind the stored procedures which has table variable on it
i want to find the stored procedures,Just procedure name. which has table variable on it
View ArticleCREATE TRACE for ONLY DML COMMANDS
how to enable trace for only DML statements which was executrd by only the sysadmin users
View ArticleI am trying to send the results of sqlquery to an email in excel sheet using...
The results of my query has 701 rows. but when executing the msdb.dbo.sp_send_dbmail. i am receiving the email in excel sheet but all the rows are not displaying in the excel sheet only top 40 rows are...
View ArticleLook up and Update
Hi All, I have one new table named IBC which contains the below columns: Model1 Model2 Model3 Model4 Model5 Model6 Model7 ResultingModel ResultingIBType ID I have one old table named XYZ which contains...
View Articlecreate a table theough sp
i want create a table just like this-: declare @datetime datetime declare @date varchar(20) select @datetime=(GETDATE()-1) select @date=convert(varchar(10),@datetime,112) print @datetime print @date...
View ArticleOR operator taking time
Hello, I have a SP which goes to long run by adding a OR statement in the where clause. Can someone help as how to resolve this?
View ArticleParameters Sniffing
Hi, I have a SP which runs fast without parameters but when i define parameters like @customer and @location and then run the SP it takes lots of time to execute. Can someone help me on this?
View Articlecustomized quarter calculation in sql
Hi Team, We have got a customized quarter list from client which we need to take reference to get data in SQL. Could you please help. 30-Oct 29-Jan AS Quarter1 30-Jan 30-Apr AS Quarter2 01-May 30-Jul...
View Articlealter column with default value
alter table enquiry alter column RejectReson int default 0 I want alter the column data type with default value zero,but it is not happening.
View ArticleNULL Value
When i am running a SP i am getting an output multiple times for a particular Id. Ex Below: Customer ProductCategory SPARE_PART sRevisionLevel sPartNumber IBIBlockID sEquipmentNumber Amazon.com...
View ArticleTo caps first letter of each word
Hi, could you please help me, i want to convert column's value in a specific order. currently i have a column(businessname). e.g. i have a value in that column like "KESSTECH IT SOLUTIONS GH LTD" then...
View ArticleAdd TotQty column which will multiple all qty
can someone help to add a calculation at each level to multiple all the quantities and it must assigned to the new column named TotalQty in the below query: ALTER PROCEDURE [dbo].[SP] ( @PartNumber...
View ArticleIncorporate logic from one SP to other
Hi, I have 2 SP's SP1 and SP2. I need the logic of SP 2 to be present in SP1. Can this be done? Please refer the attachments[link text][1] [1]: /storage/temp/4210-sp2.txt
View ArticleList of tables in all databases used in stored procedures
We have created stored procedures which include lot of tables from different databases in same server. Now i need to list all the table corresponding particular stored procedures. I have tried the...
View Articleorder by is not working
Hello Team, we have a table where files column like FR1 ,FR10 ,FR2 ,FR3 ,FR4 ,FR5 ,FR6 ,FR7 ,FR8 ,FR9 when we are using order by to the column of this file to get the F10 value below F9 is not working...
View ArticleIn-place Upgrade sql 2005 to 2008 Error Code 0xB8A6B4FA
Hi, I am trying to in-place upgrade sql server from 2005 to 2008. Everything went smoothly but the database engine, SQL Server Replication, Full-Text Search, AS, and RS failed to upgrade. The log as...
View Article