Viewing 15 posts - 826 through 840 (of 897 total)
; WITH cteTableName AS
(
SELECTROW_NUMBER() OVER( PARTITION BY Man_name ORDER BY Model ) RowNum, *
FROMTableName
)
SELECTCASE WHEN RowNum > 1 THEN '' ELSE Man_name END Man_name, Model
FROMcteTableName
This should do it for you..
March 23, 2010 at 6:17 am
Why such a strange requirement? What is the problem if the trigger gets called 10 times? But still if you want the trigger to be called only once try converting...
March 23, 2010 at 4:47 am
SELECTE.*
FROMTRANSACTION T
INNER JOIN EMPLOYEE E ON T.RegisteredBYEmpID = E.EmpID
WHERET.RegisteredBYEmpID = T.ApprovedByEmpID
I hope this will give you the desired result. It would have been better if you had provided some sample...
March 23, 2010 at 2:53 am
Bhuvnesh (3/23/2010)
Kingston Dhasian (3/22/2010)
But i have spoken to thousands of U.S citizens without going out of India even once. Guess how???Clients interaction 🙂 ?
Which company would be having thousands of...
March 23, 2010 at 12:29 am
Born in Kanniyakumari ( India )
Brought up in Mumbai ( India )
Employed for a year in Chennai ( India )
Now i am back in Mumbai working on SQL Server 2005.
But...
March 22, 2010 at 11:43 pm
steveb. (3/22/2010)
Kingston Dhasian (3/22/2010)
SELECT*
FROMdt
WHEREDAY( DATEADD( DAY, 1, dt ) ) != 1
I don't think performance should be a concern as almost all the rows ( hopefully ) are returned....
March 22, 2010 at 11:17 pm
Jeff Moden (3/22/2010)
March 22, 2010 at 11:10 pm
SELECT*
FROMdt
WHEREDAY( DATEADD( DAY, 1, dt ) ) != 1
I don't think performance should be a concern as almost all the rows ( hopefully ) are returned. In such a case...
March 22, 2010 at 6:53 am
chandrasekaran.ganapathy (3/22/2010)
Hi Kingston,Just for curiosity asking, can we handle the tie value in Row_number()?
No, you can't. You can use the RANK or the DENSE_RANK for the same.
Again both of...
March 22, 2010 at 5:30 am
chandrasekaran.ganapathy (3/22/2010)
No specific reason? I want to handle the tie value also. that's why? can we handle tie value also in row_number?
ROW_NUMBER gives unique values even if it is a...
March 22, 2010 at 5:18 am
chandrasekaran.ganapathy (3/22/2010)
Select Salary from Table1 Where Salrank='3' Where (Select Dense_Rank()
over (Order By Salary...
March 22, 2010 at 5:02 am
Does the below query return any NULL values
select (EngineerId) from Table2
March 19, 2010 at 6:11 am
chandrasekaran.ganapathy (3/19/2010)
March 19, 2010 at 4:43 am
I doubt if anybody is going to get this right. 20 attempts so far and nobody has got it till now.
It would be better somebody from SSC reviews the Question...
March 18, 2010 at 10:32 pm
Viewing 15 posts - 826 through 840 (of 897 total)