This is the select statement which i have got the correct answer:
select s_billing_cycle.Billing_cycle from s_billing_cycle
join o_daily_lcsgeneration_copy on o_daily_lcsgeneration_copy.Location=s_billing_cycle.Location where o_daily_lcsgeneration_copy.Date between s_billing_cycle.From_Date and s_billing_cycle.To_Date
while updating the same query into another table i couldnt do that using update query getting : You cant update target table "o_daily_lcsgeneration_copy" for update in FROM Clause the query i have used is :
update o_daily_lcsgeneration_copy set o_daily_lcsgeneration_copy.Billing_cycle = (select s_billing_cycle.Billing_cycle from s_billing_cycle join o_daily_lcsgeneration_copy on o_daily_lcsgeneration_copy.Location=s_billing_cycle.Location where o_daily_lcsgeneration_copy.Date between s_billing_cycle.From_Date and s_billing_cycle.To_Date)
Help me !!!