CMD = New SqlCommand("update t set t.tb_TempSec_PreviousValue=I.G,from tb_TempSector t inner join(select tb_MainInv_ClntCode,sum(tb_MainInv_GrandTot)G,tb_MainInv_InvoiceType,tb_MainInv_MonYear from tb_Main_Invoicing group by tb_MainInv_ClntCode,tb_MainInv_InvoiceType)as I on t.tb_TempSec_ClntCode =I.tb_MainInv_ClntCode and I.tb_MainInv_MonYear<'" & d & "' and I.tb_MainInv_InvoiceType is null", CON)
I want data to display based on tb_MainInv_MonYear ,but i dont want to group it .
How can i modify the code