ronitreddy Posted July 27, 2015 Report Posted July 27, 2015 distinct use cheyadam anta correct kadu ani friend gadu aninde bhaiyya anduke couldn't do that... select distinct date_received, loan_number from test order by date_received; ala chesthe raada?
agora Posted July 27, 2015 Report Posted July 27, 2015 man ikkada ekkadoo maaanchi sql vaasanaa vastundeeeeeeeeee :) email ki reply please
ronitreddy Posted July 27, 2015 Report Posted July 27, 2015 DISTINCT is a very costly operator. It will do a SORT and TOP on you query in the execution plan behind the scenes. so if you have a distinct in your query, sometimes the result set is delayed because it needs to sort the data (overhead to the application)... ee Loveindia gaadu edo taagesi vaagutunnadu anukuntunnav kada man, kaavalantey select ur query and press CTRL + L (if you have permissions to see execution plan man).... you will see that.... adi sql developer lo pani cheyadu kada man
loveindia Posted July 27, 2015 Report Posted July 27, 2015 MAX use chesaav, adem goppa solution kaadu (sorry), cos grouping is also a costly operator (sometimes, again depends on your data set)... ;WITH CTE AS ( SELECT DateReceived , LoanNumber, ROW_NUMBER() OVER(Partiton By DateReceived, LoanNumber ORDER BY DateReceived) AS Rnum ) SELECT DateReceived, LoanNumber FROM CTE WHERE Rnum = 1 This will write the data to memory (faster) and retrieve from Memory where as MAX will write the temporary dataset to a disk and then retreive based off of it... so now you decide which one to choose man.... PS: Query not tested as I am not in front of a computer, but this should work man.... Subquery kuda possible, but enhance the solution using a CTE man...
ronitreddy Posted July 27, 2015 Report Posted July 27, 2015 DISTINCT use cheyadam tappu ani cheppina mee friend enduku adi tappoooo cheppaledaa man.... athanu ne antha talented kadu emo man..just ala cheppi urkunnadu emo man
mtkr Posted July 27, 2015 Report Posted July 27, 2015 adi sql developer lo pani cheyadu kada man management studio
loveindia Posted July 27, 2015 Report Posted July 27, 2015 adi sql developer lo pani cheyadu kada man i believe he is using SQL Server man... yes, sql developer lo aitey work avadu... daaniki verey options unnai ga...
loveindia Posted July 27, 2015 Report Posted July 27, 2015 athanu ne antha talented kadu emo man..just ala cheppi urkunnadu emo man man, good tasty cream biscuit man...
loveindia Posted July 27, 2015 Report Posted July 27, 2015 management studio did you start using 2014 man... features are arupulu man....
ronitreddy Posted July 27, 2015 Report Posted July 27, 2015 management studio eppudu t-sql ee na..antha biased enduku sql server ante..
ronitreddy Posted July 27, 2015 Report Posted July 27, 2015 man, good tasty cream biscuit man... so u tasted it man?
loveindia Posted July 27, 2015 Report Posted July 27, 2015 eppudu t-sql ee na..antha biased enduku sql server ante.. cos adey maa food devatha man and mgmt studio is highly optimized engine man...
Recommended Posts