sql - i have a set of account numbers to which i have to map 12 months data in respective months column -
i have set of account numbers .i need map values 12 months against account numbers in respective month.
while using update query throws more 1 value being thrown . please suggest.
upate balances set inrambfeb14=feb14.inramb feb14 balance.accountno=feb14.accountno
cte ( select accountno,max(inramb) inramb feb14 group accountno ) update balances set inrambfeb14 = cte.inramb cte join balances bal on bal.accountno = cte.accountno
this give max value update...
for more suitable answers should give input data & expectation clearly
Comments
Post a Comment