sql server - insert data in a row with undefined values in each row -


i have table few columns name,stage1, stage2, stage3, stage4, stage5. want insert values these columns, every time when new row being inserted table, number of stages entered under each row undefined example:-

suppose in row 1 values stage1 , stage2 defined, , row 2 values stage1, stage2, stage3 , stage4 defined , on

problem not able insert new row in table because of uneven distribution of values each name.

you want use relational database unstructured data. assume because tagged sql server.

this document dbs or nosql dbs designed for.

however, can emulate if want storing data in single column. within column can store either json or xml. json going hard query, sql server support xml field type can query xpath.

the other option rotate data 90 degrees. instead of each stage being column stage1, stage2, stage3.... create row each stage. each row have stagenumber field or such. later pivot data display stages columns in excel or other pivot table or whatever.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -