日期:2014-05-18  浏览次数:20551 次

股票数据查询系列问题1
明:周末突发奇想,搞个非实时的日线分析股票的小东西
目前构建了两个表:
表   stockcode--存放股票基本资料
ID   stockCode   stockName  
2225   000001     深发展A
2226   000002     万科A
2227   000003     PT金田A
2228   000004     ST国农
2229   000005     ST星源
2230   000006     深振业A
2231   000007     ST达声
.......

表stockprice---存放价格(日期   开盘 最低    最高 收盘   成交量 资金)
                ID           stockCode   stockDate             OPrice   LPrice     HPrice     CPrice             Vol       Funds
88 000001 2007-08-31 37.65 36.95 38.1 38 173834 65528.8
89 000001 2007-08-30 37.28 36.58 38.08 37.7 246827 91801.16
90 000001 2007-08-29 37.48 36.6 37.68 36.84 267208 98924.54
91 000001 2007-08-28 38.52 37.5 38.8 37.99 313335 118790.97
92 000001 2007-08-27 39.58 38.41 40.86 39.2 275096 109384.56
93 000001 2007-08-24 38.34 38.2 40.02 39.6 389456 153840.25
94 000001 2007-08-23 38.4 37.7 38.8 38.39 264577 100479.57
95 000001 2007-08-22 37.85 37.63 39.58 38.59 315341 122444.39
96 000001 2007-08-21 38.45 37.7 39.26 38.56 335990 129941.61
97 000001 2007-08-20 36 36 38.15 37.9 366385 137115.49
98 000001 2007-08-17 35.99 34.38 36.9 34.88 420685 149258.8
99 000001 2007-08-16 38.02 35.77 38.05 36.25 385348 141712.76
100 000001 2007-08-15 38.4 37.45 38.98 38 246045 93615.79
101 000001 2007-08-14 39.2 36.99 39.33 38.35 349273 132011.89
102 000001 2007-08-13 38.5 38 40 39.1 260558 101333.41
103 000001 2007-08-10 39.8 38.48 40.1 39 185781 72887.16
104 000001 2007-08-09 38.82 38.53 40.1 40.01 308030 122424.2
105 000001 2007-08-08 38.3 38 40.5 38.82 261425 102744.42
106 000001 2007-08-07 38.95 38.27 39.45 39.1 156322 60829.17
107 000001 2007-08-06 38.99 38.26 39.89 39.18 258177 100531.83
108 000001 2007-08-03 38 37.88 39.55 39.11 438271 170625.75
109 000001 2007-08-02 35.3 35.3 37.85 37.7 396583 145256.61
110 000001 2007-08-01 36.25 34.41 37.1 35.01 291433 104275.65
111 000001 2007-07-31 33.85 33.65 36.4 36.23 418203 147946.58
112 000001 2007-07-30 33.7 33.6 35.08 34.2 244882 84494.16
113 000001 2007-07-27 34.75 33.5 34.85 33.85 337391 114857.79
114 000001 2007-07-26 35 34.75 35.5 34.99 267510 93909.2
115 000001 2007-07-25 33.36 33.36 35.38 35.2 348526 120782.08
116 000001 2007-07-24 32.98 32.5 34.65 33.36 349242 117778.08
117 000001 2007-07-23 33.4 31.76 33.4 32.95 528016 172864.06
118 000001 2007-07-19 29.9 29.69 31.29 30.48 303028 93252.64
119 000001 2007-07-18 29 28.63 31.2 30.24 563889 170325.63
120 000001 2007-07-17 27.4 27.2 29.18 29.15 329571 93194.61
121 000001 2007-07-16 28.2 26.53 28.2 26.55 176135 47827.18
122 000001 2007-07-13 29 28.03 29 28.35 75288 21298.45
123 000001 2007-07-12 28.25 28.25 29.17 28.75 152057 43750.27
124 000001 2007-07-11 28.4 28.01 28.66 28.12 114247 32276.17
125 000001 2007-07-10 28 28 29.35 28.45 335470 96413.51
126 000001 2007-07-09 27.3 27 28.5 28.1 272595 76071.62
127 000001 2007-07-06 25.5 25.41 27.12 27.01 440714 116687.33
128 000001 2007-07-05 25.7 25.14 26.87 25.2 371587 97198.99
129 000001 2007-07-04 27.45 26.1 27.55 26.2 243960 65271.05
130 000001 2007-07-03 27.55 26.73 28.15 27.23 252532 69364.51
131 000001 2007-07-02 26.81 26.57 27.86 27.4 323761 87561.47
132 000002 2007-08-31 33.58 33.21 34.3 33.8 754160 253335.47
133 000002 2007-08-30 34.02 32.95 34.8 33.5