Thanks for the reply. I tired it, but I don't want to do an inner join as I need records. We have added an index too, and instead of left outer...
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 realised that i was doing something wrong in group by, after reading ur post. I was able to fix the problem. Thanks for the help.
Thanks for replying to my post. By doing select answer, max(maxanswer) as maxanswer from table groupby answer will get the overall maximum value of...
I have two tables A and B while joining them its resulting multiple row set as follows... Answer MaxAnswer 3 1 3...
I tried it, but this will give the maximum of entire column value What I want is while retriving maximum of that value. In the example Can you can...
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...
I did something like this... Select @ID = ID From dbo.TableName Where ParentId = (Select ID From dbo.TableNameWhere ParentId = (Select ID From...
Hi, I have a table which stores the data as follows ID Name ParentID value 1 Parent NULL I am the parent 2...
Got it ! Thanks
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...
It was written that way from before...
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...
Was able to solve the problem I casted it to smalldatetime before converting to 101 ...
Separate names with a comma.