Hi ,
I have 3 tables
general_info table -- Master Table(property_id primary key)
Tax_table -- Child table(will contain Multiple records for a property for each year)(property_id foreign key)
Sale_Table --Child table(will contain Multiple records for a property for each year)(property_id foreign key)
SELECT * FROM tax_info where site_county='MyCounty' and site_state='MyState' ORDER BY property_id,tax_year DESC
This Query will return the records for property based on it tax_year and the first record for each property id will be the recent one,
SELECT * FROM sale_info where site_county='MyCounty' and site_state='MyState' ORDER BY property_id,sale_date DESC
This Query will return the records for property based on it sale_date and the first record for each property id will be the recent one,
I need to take only the recent tax entry for a property,and sale and need to show in an excel file as follows
PropertyId address tayear sale_date
I have achieved this in C# using data set,but when the no of records increases more than 500000 it will throw system.out of memory exception and
it will causes error.So i would like to do it db side.IS there any way i can achieve this