我想得到一个字段中有多少个不重复的值,也就是 select count (distinct a) from b;
我用ACCESS做数据库,运行时会提示:distinct未定义。请问用什么办法可以解决/??另select a_ply as 比例 from a这里我想要比例后面跟一个%,可是直接写select a_ply as 比例% from a,会出错。不知道用什么办法?先谢了。
我用ACCESS做数据库,运行时会提示:distinct未定义。请问用什么办法可以解决/??另select a_ply as 比例 from a这里我想要比例后面跟一个%,可是直接写select a_ply as 比例% from a,会出错。不知道用什么办法?先谢了。
(select distinct(a) from b)
第二個問題:select a_ply as [比例%] from a
select count(*)
from
( select myField
from myTable
group by myField
)
--
select myStringNum +'%' as myNewName
from myTable
select count(a_id),count(distinct b_id),sum(a_ply) from a group by a_times;
不知道该怎么办。。谢谢各位了
Access用的SQL是Jet SQL,SQL Server用的是T SQL
但是我的问题该怎么解决?
count((select distict a_id from b)),
count((select distict b_id from b)),
sum(a_ply)
from from a group by a_times;
select a.a,c.c from
(select count(b.b) as a from (select distinct b_id as b from a)b)a,
(select count a_id as c from a)c
(select count(b.b) as a from (select distinct b_id as b from a)b)a,
(select count a_id as c from a) c
group by a.a,c.c