I get this error with SQL listed below.
"Subquery returned more than 1 value. This is not permitted when the
subquery
follows =, !=, <, <= , >, >= or when the subquery is used as an expression."
I am trying to run the query below but I get the error above.
SELECT
AM.dbo.PE.REP_ACT_ID,
AM.dbo.AC.access,
AM.dbo.AC.userid
FROM
AM.dbo.PE_FMS,AM.dbo.AC
WHERE
(
(AM.dbo.PE.REP_ACT_ID= (Case when 'all' =ltrim (rtrim (UPPER ('all')))and (
(select
access
from
AC
where
AM.dbo.AC.access = 'all'
and
AM.dbo.AC.USERID ='michael')is not null )then '62' else '' end)
) )
When I run the query below I get a value 62, which is only one value. But
when
i run the query above i get the error on top. Do you know what the problem
is
and how to fix it. Thanks.
select
(Case when 'all' =ltrim (rtrim (UPPER ('all')))and (
(select
access
from
AM.dbo.AC
where
AM.dbo.AC.access = 'all'
and
AM.AC.USERID ='michael')is not null )then '62' else '' end)
_________________________________________________________________
Puzzles, trivia teasers, word scrambles and more. Play for your chance to
win! http://club.live.com/home.aspx?icid=CLUB_hotmailtextlink
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8
Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2904
Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.6