Skip to Main Content

Japanese

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL Query Help

PS SPDec 14 2015 — edited Dec 15 2015

@Need a help in writing oracle query

I have a table Test with following information

DIM1DIM2DIM3DIM4DIM5DIM6SM1SM2SM3SM4SM5SM6
ABCDEF123456
ABCDEF222222

I would need data with sum row wise, I wrote this query it works.

select DIM1, DIM2,DIM3,DIM4,DIM5,DIM6,(SM1+SM2+SM3+SM4+SM5+SM6) from  Test


But my requirement in table columns might increase, hence I would need this query to be dynamic, it should work though any additions or deletions in columns with out changing query.We are using Oracle 11g.


Thanks in advance.





Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 12 2016
Added on Dec 14 2015
1 comment
800 views