i am trying got data from table a and table b in a sub query. I have to do a left outer join and in where clause I have to check if the column1 is...
Hi, I want to a script based on sql server version year, because some objects are not supported in 2000. We have two enviorments. something like if...
I have few tables from which I have to extract the data in such a way that it comes out as comma seperated values. For example I extracted the data...
Hi, I am writing a query some thing like this select * from ems e inner join roles r on r.roleid in (select value from...
we have a log table where we are storing a program status in one of the columns and datetime stamp. A new row is appended when ever a change in the...
Hi, I have few tables which I am joining to get some data. I want to join a table only on certain condition. For example I have to get data if the...
I have two tables A and B while joining them its resulting multiple row set as follows... Answer MaxAnswer 3 1 3...
Hi, I am writing a stored procedure where I want to select max of the value, let me explain select answer, allanswers from table abc join.... will...
Hi, I have a table which stores the data as follows ID Name ParentID value 1 Parent NULL I am the parent 2...
Hi, I have a table as follows Users UserName Role ABC 1,2,3 MNX 1,2 So, if i want to query weather the user ABC has...
Hi, I have a stored procedure which I want to execute it daily at 5.00 pm. I am using SQL Server 2005, I read that I can use Sql Server Agent and...
Hi I want to convert the entire column in a table from one format to other right now the date is stored as 'Dec 6 2007 12:00AM' I want to convert it...
Hi, I want to update a table with dates for all users... so here is the script that i have written...Update employessSET DateOfTraining =...
I have this stored procedure...set ANSI_NULLS ON set QUOTED_IDENTIFIER ONgoALTER PROCEDURE [dbo].[Map_GetPointsFromLegacyDB](@SourceID int, @Zoom...
Hi, I have a table tblStatu with columns ID Name Status 1 Yellow Active 2 Red Active 3 Green Inactive 4 Blue REmoved Now i wrote...
Hi, I have a stored procedure in sql server 2000, which we want to run it everyday automatically at a particular time, basically schedule the job to...
Hi, I want to know how to call a stored proc inside a stored proc. I am working with Sql Server 2005. Here is the situation i have a table accounts...
1,How can we check existing indexes on the tables involved in a stored proc?<br />2,If there are none, then how can we create one?<br /><br...
I want to know how look at the execution plan of a stored procedure and see if there is anything I can do to optimize the performance in SQL Server...
Separate names with a comma.