我在MS Access数据库中的表(办公室2013): Table1
ID ACC_YEAR PROGRESS
1 2008-09 IP
2 2008-09 IP
3 2008-09 C
4 2009-10 IP
“ACC_YEAR”是一个文本字段和“进步”场可能有四个可能的值:IP/C/NS/UCS。 现在我想有一年明智&进度明智盘点报告是这样的: ACC_YEAR IP
我有这样的子查询。基本上我使用多个分离标准来形成多个子查询。 SELECT
this_.id AS y0_,
this_.a AS y1_,
this_.b AS y2_,
this_.c AS y3_,
this_.d AS y4_,
this_.e AS y5_
FROM
table_a this_
嗨,感谢您的阅读。 SELECT DISTINCT (thisID and thisNAME) from table1 WHERE thisID IN
(SELECT id from table2 WHERE ... condtions)
OR
(SELECT id from table3 WHERE ... different condtions)
OR
(SELECT id from
select语句返回位于独特城市和州中的每个供应商的名称,城市和州(即排除与另一个供应商具有相同城市和州的供应商) SELECT
VendorName, VendorCity, VendorState
FROM
Vendors
WHERE
VendorState + VendorCity NOT IN (SELECT VendorState + VendorCit
我通常知道"the order of evaluation for expressions involving user variables is undefined",所以我们不能在同一个select语句中安全地定义和使用变量。但是如果有子查询呢?举个例子,我有这样的事情: select col1,
(select min(date_)from t where i.col1=col1