表如下
id (pk)int
idate datetime
blue01 intid blue01
1 1
2 5
3 6
4 8
....
如何从当前记录中搜索出 id 范围在 1-50或处于idate的一个日期期间,并且blue01不存在于数据库中的数字,blue01范围是在1-16之间
id (pk)int
idate datetime
blue01 intid blue01
1 1
2 5
3 6
4 8
....
如何从当前记录中搜索出 id 范围在 1-50或处于idate的一个日期期间,并且blue01不存在于数据库中的数字,blue01范围是在1-16之间
这个是什么意思????
[Table] a right join (select 1 a union all select 2....)b
on a.blue01=b.a
where a.id between 1 and 50 and a.blue01 is null
where id between '1' and '50'
or convert(varchar(30),idate,101) between '08/30/2008' and '08/30/2008'
and blue01 between '1' and '16'
bule01的值都不存在表中了,还能查到数据吗??
如现在查询结果集中的blue01有:1,2,5,8,10
那么我要得到的结果是:3,4,6,7,9,11,12,13,14,15,16
我实在不想解释太多,我就是要这个结果,剩下的交给程序处理了。
实际上得到了这个结果,我要在程序里把blue01的结果分开,然后用随机数生成1-33之间的数字每组6个数字,每组对应一个blue01
看到这里大家也许该明白了把,我要做一个双色球分析软件,找到50期中没有出现过的蓝号,然后红号随机生成与这些蓝号进行组合,最后算出回报率。