Re: Help: update multiply columns in table
Posted in 1995
In article <1995Aug27.225135.57444@msuvx2.memphis.edu>, <tangh@cc.memphis.edu> wrote: >I am trying to write a SQL to produce a report. The final report includes >statistics for 15 cities (one column for each city). I write the result into a >temp table first, there are only 3 columns in the temp table (city, halfhr, >col1). Then I write the following SQL to insert the result into the result >table which has 15 columns (one for each city). I use the following statements ... before I jump off on the wrong track here, is it the case that your data looks sort of like this: ------------------------- TABLE: temperature ------------------------- city time degrees OBK 10:00 98 OBK 10:30 99 OBK 11:00 99 ... ... DAL 10:00 80 DAL 10:30 84 DAL 11:00 91 ... ... ------------------------- and the report you want to produce looks sort of like this: time OBK DAL SFO DEN NYC 10:00 98 80 ... 10:30 99 84 ... 11:00 99 91 ... ... ... If so I think I have a better solution for you, but please confirm or deny so that I don't type in a great long thing that isn't really your problem at all! - Paul