sql 2000 多表查询
根据日期每天生成一个表,命名格式 Local_日期,例如Local_20120224,Local_20120225
表的格式是一样的,有字段类型为text的字段
现在要从这些表中查询所有数据
应该如何查询呢 ?
我尝试了一下
select * from Local_20120224,Local_20120225 where SourceID = 'src:10104' and pType = 'Central'
select * from Local_20120224 where SourceID = 'src:10104' and pType = 'Central' union select * from Local_20120225 where SourceID = 'src:10104' and pType = 'Central'