Re: Alias "all fields"?
От | Franz.Rasper@izb.de |
---|---|
Тема | Re: Alias "all fields"? |
Дата | |
Msg-id | 11EC9A592C31034C88965C87AF18C2A702B83682@m0000s61 обсуждение исходный текст |
Ответ на | Alias "all fields"? (Franz.Rasper@izb.de) |
Список | pgsql-general |
>My table design is - due to some import/update reasons - surely not >the best one, but pretty simple: > >id y1970 y1971 y1972 ...... >1 23 25 28 >2 NULL NULL 5 >3 NULL 94 102 > >What do you think? Normally i use perl with DBD/DBI to import data into databases and it is quite easy to modify raw data with perl and import them. I would prefer another table design (your import will then not be so simple, but your "selects" will get "normally" faster and easier). Table: id_Table;id_row;t_year;t_year_value 1;1;y1970,23 2;1;y1971;25 ... .... 20;3;y1970;NULL 21;3;y1971;94 You will need only id_row if you need all tuples in the same line of your original line. I yould do it so, if you have more then 3 or 4 columns of y???? . Greetings, -Franz
В списке pgsql-general по дате отправления: