4Vikram Posted July 27, 2015 Report Posted July 27, 2015 I have a dataset which have a date column and due to this I am getting duplicates on another column... so just wanted a possible outcome for it and cannot use distinct.. please help DATE RECEIVED Loan Number 12/30/1899 12:00:00 AM 5003418 12/30/1899 12:00:00 AM 5003418 6/11/2015 12:00:00 AM 5003418 help please...
vikuba Posted July 27, 2015 Report Posted July 27, 2015 select count(loan number), loan number, Date received from table group by Date received, loan number
SUbba LIngam Posted July 27, 2015 Report Posted July 27, 2015 naku question artham kaale, neeku output ela kavali ?
4Vikram Posted July 27, 2015 Author Report Posted July 27, 2015 naku question artham kaale, neeku output ela kavali ? output lo okate loan number ki 3 different dates ostunai.. ante rendu emo same date (duplicate) and another with different date. so aa two different dates chupiyali but cannot use distinct at select statement
SUbba LIngam Posted July 27, 2015 Report Posted July 27, 2015 output lo okate loan number ki 3 different dates ostunai.. ante rendu emo same date (duplicate) and another with different date. so aa two different dates chupiyali but cannot use distinct at select statement distinct use cheste neeku kavalsina output vastundi ga just 2 rows, enduku use cheyoddu ?
Suhaas Posted July 27, 2015 Report Posted July 27, 2015 Question koncham confusing ga undi bhayya. Ni current dataset ni retrieve chesthunna sql query or table schema post cheyyi bhayya it will be easier to post a solution.
ibabu Posted July 27, 2015 Report Posted July 27, 2015 output lo okate loan number ki 3 different dates ostunai.. ante rendu emo same date (duplicate) and another with different date. so aa two different dates chupiyali but cannot use distinct at select statement Oracle ithe dense rank partion by all columns order by rowid petti and again select From this seelct where rk =1
Walcommon Posted July 27, 2015 Report Posted July 27, 2015 I have a dataset which have a date column and due to this I am getting duplicates on another column... so just wanted a possible outcome for it and cannot use distinct.. please help DATE RECEIVED Loan Number 12/30/1899 12:00:00 AM 5003418 12/30/1899 12:00:00 AM 5003418 6/11/2015 12:00:00 AM 5003418 help please... neeku emmana primary key unda?? If so try below one.. Select * from (SELECT a.*, ROW_NUMBER () OVER (PARTITION BY DATE_RECEIVED , Loan_Number ORDER BY << give Primary key >>) seq_no FROM << Your table name>> a) Where seq_no = 1;
nenu_devudni Posted July 27, 2015 Report Posted July 27, 2015 group by date_received, loan_number should work vuncle ... wat is the result when u group by ?
4Vikram Posted July 27, 2015 Author Report Posted July 27, 2015 have solved the query, use Max function for the Date column and did group by at the end... possible solution ani expecting and gave it to my manager.. lets see what he comes back... thanks everyone for the suggestions.. thanks guys.. (.L@ (.L@
4Vikram Posted July 27, 2015 Author Report Posted July 27, 2015 distinct use cheste neeku kavalsina output vastundi ga just 2 rows, enduku use cheyoddu ? distinct use cheyadam anta correct kadu ani friend gadu aninde bhaiyya anduke couldn't do that...
loveindia Posted July 27, 2015 Report Posted July 27, 2015 man ikkada ekkadoo maaanchi sql vaasanaa vastundeeeeeeeeee :)
loveindia Posted July 27, 2015 Report Posted July 27, 2015 DISTINCT use cheyadam tappu ani cheppina mee friend enduku adi tappoooo cheppaledaa man....
loveindia 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....
Recommended Posts