Jump to content

Recommended Posts

Posted

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?

  • Replies 135
  • Created
  • Last Reply

Top Posters In This Topic

  • ronitreddy

    42

  • loveindia

    40

  • 4Vikram

    23

  • mtkr

    17

Popular Days

Top Posters In This Topic

Posted

question confusing gaa vundhi man pwsEoTb.gif

Posted

man ikkada ekkadoo maaanchi sql vaasanaa vastundeeeeeeeeee :)

email  ki reply please

Posted

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....353a9aq.gif

adi sql developer lo pani cheyadu kada man

Posted

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... 353a9aq.gif

 

 

Posted

DISTINCT use cheyadam tappu ani  cheppina mee friend enduku adi tappoooo cheppaledaa man.... 353a9aq.gif

athanu ne antha talented kadu emo man..just ala cheppi urkunnadu emo man

Posted

adi sql developer lo pani cheyadu kada man

 

 

management studio

Posted

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...353a9aq.gif

Posted

athanu ne antha talented kadu emo man..just ala cheppi urkunnadu emo man

 

man, good tasty cream biscuit man... 353a9aq.gif

Posted

management studio

 

did you start using 2014 man... features are arupulu man.... 353a9aq.gif

Posted

management studio

eppudu t-sql ee na..antha biased enduku sql server ante..

Posted

man, good tasty cream biscuit man... 353a9aq.gif

so u tasted it man?

Posted

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... 353a9aq.gif

×
×
  • Create New...