我在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