-------帮我修改一下----------
 address       
 -----------------------       
 01                  四川省       
 02                  北京市       
 03                  天津市       
 ……       
 -----------------------       
 subject       
 -----------------------       
 01                              施工员       
 02                              预算员       
 03                              资料员       
 ……       
 -----------------------       
 kd 
 ----------------------- 
 id         kd 
 11         1号考场 
 12         2号考场 
 13         3号考场 
 14         4号考场 
 15         5号考场 
 16         6号考场 
 ----------------------- 
 enter       
 -----------------------       
 name                           subject      address         kd            examnumber       
 王1                              施工员            天津市         11            03110100001       
 王2                              预算员            北京市         12            02120200001       
 王3                              预算员            北京市         12            02120200002       
 王4                              施工员            四川省         13            02130100001       
 王5                              施工员            四川省         13            02130100002       
 王6                              资料员            天津市         14            03140300001       
 王7                              资料员            天津市         14            03140300002       
 王8                              预算员            天津市         15            03150200001       
 王9                              预算员            天津市         15            03150200002       
 王10                           预算员            四川省         16            02160200001 
 ------------------------       
 现在表里面的examnumber      全是空的。       
 原来是没有考点,只是:   地址+科目+5位排序号    
 代码如下: 
 update   e 
 set      examnumber   =a.addressid+s.subjectid+right(100000+(select   count(*)   from   enter   where   address=e.address   and   subject=e.subject