0

I have a requirement to create a view which would fetch data from 1000 columns of different tables. How do I do that?

I cannot reduce the number of columns. 
View Partitioning or having 2 different views is also not an option. 

Working with a view type object or collections can do the trick but I am not sure how? Could anyone please help?

Ajim Bagwan
  • 127
  • 3
  • 10
  • A view should accommodate 1000 columns as you asked inside the question. Shouldn't it? – Srini V Jun 26 '14 at 15:18
  • A view needs to be created having more than 1000 columns. – Ajim Bagwan Jun 26 '14 at 15:26
  • The other question is a bit different. Not duplicate. – Ajim Bagwan Jun 26 '14 at 15:28
  • Oracle doesn't allow more than 1000 columns in a table or a view. What you are asking for, therefore, is not possible. If you explain the business problem you're trying to solve, we may be able to help you come up with alternatives. It seems highly unlikely, though, that a well-designed system would include a view with more than 1000 columns. Normalizing the results would likely be very helpful. – Justin Cave Jun 26 '14 at 15:39
  • what is the difference?? I dont find any. You mean you suffer the same problem (which is universal wrt oracle) – Srini V Jun 26 '14 at 15:40
  • The problem is simple, we need to create a view which will have more than 1000 columns. This maybe done by using an object type as a column to hold these extra columns but not sure how. Hence the question. – Ajim Bagwan Jun 26 '14 at 15:43
  • i think the base question is why would you NEED to do this? there is probably a much better solution if you would describe the problem and not restrict yourself to the solution. – Randy Jun 26 '14 at 16:04
  • 1
    have you tried storing the data in XML? – tbone Jun 26 '14 at 16:36
  • @AjimBagwan Object types won't help you here either. Each attribute of an object is physically stored like a hidden column and counts against the 1000 column limit. The only way "trick" you can do with object types is to use inheritance to reduce column count: if supertype A has 10 columns, subtype B has an additional 10 columns, and subtype C also has an additional 10 columns - it will only count as 30 columns instead of 40. – Jon Heller Jun 27 '14 at 01:53

0 Answers0