M
Michel Walsh
Hi,
Neither Jet, neither MS SQL Server 2000 allows the vector notation:
WHERE (field1, field2) IN ( SELECT g1, g2 FROM table2 )
is not supported. You have to use the EXISTS syntax:
WHERE EXISTS( SELECT * FROM table2 WHERE field1=g1 AND field2=g2 )
Hoping it may help,
Vanderghast, Access MVP
SELECT statement of the subquery to request only one field.
Services for more information.
Neither Jet, neither MS SQL Server 2000 allows the vector notation:
WHERE (field1, field2) IN ( SELECT g1, g2 FROM table2 )
is not supported. You have to use the EXISTS syntax:
WHERE EXISTS( SELECT * FROM table2 WHERE field1=g1 AND field2=g2 )
Hoping it may help,
Vanderghast, Access MVP
records based on the maximum value of another column. The query is:Stephanie Doherty said:Hello World,
I am writing an update query that changes a column value for a group of
using the EXISTS reserved word in the main query's FROM clause. Revise theUPDATE rail_sw
SET fetype = 1
where (FENAME, Length) in
(SELECT FENAME, MAX(LENGTH)
FROM rail_sw
WHERE FENAME <> ' ' AND
FENAME NOT LIKE '%ABANDONED%'
GROUP BY FENAME)
When I try running the query, the following message pops up:
You have written a subquery that can return more than one field without
SELECT statement of the subquery to request only one field.
get is that this is an Error 3306 and to contact Microsoft Product SupportWhen I select Help in the pop-up window, the only additional information I
Services for more information.
conjunction with the subquery to run the update?Can anyone tell me about this EXISTS reserved word and how I can use it in