An expression of non-boolean type specified in a context where a condition is expected, near ')'.
-
Friday, October 02, 2009 8:24 PM
I'm getting the error: An expression of non-boolean type specified in a context where a condition is expected, near ')'.
On the code below. Any suggestions Thanks.
insert into rdm_port (ANLSID, ID, EVENTID, PERSPCODE, PERSPVALUE, STDDEVC, STDDEVI, EXPVALUE)select b.ANLSID, PORTID, EVENTID, PERSPCODE,
sum(PERSPVALUE) as SumOfPerspvalue, sum(STDDEVC) as SumOfSTDDEVC,
sqrt(sum(STDDEVI*STDDEVI)) AS SumOfSTDDEVI, Sum(EXPVALUE) as SumOfEXPVALUE
from rdm_geoidlob a inner join rdm_anldef b on substring (a.locncode,1,8) = b.lobname
where a.ANLSID in (1) and perspcode = 'gr'
group by b.anlsid, a.portid, a.eventid,a.perspcode
insert into rdm_port (ANLSID, ID, EVENTID, PERSPCODE, PERSPVALUE, STDDEVC, STDDEVI, EXPVALUE)
select b.ANLSID, PORTID, EVENTID, PERSPCODE,
sum(PERSPVALUE) as SumOfPerspvalue, sum(STDDEVC) as SumOfSTDDEVC,
sqrt(sum(STDDEVI*STDDEVI)) AS SumOfSTDDEVI, Sum(EXPVALUE) as SumOfEXPVALUE
from rdm_geoidlob a inner join rdm_anldef b on substring (a.locncode,1,8) = b.lobname
where a.ANLSID in (1) and perspcode = 'gu'
group by b.anlsid, a.portid, a.eventid,a.perspcode
insert into rdm_port (ANLSID, ID, EVENTID, PERSPCODE, PERSPVALUE, STDDEVC, STDDEVI, EXPVALUE)
select b.ANLSID, PORTID, EVENTID, 'rp',
sum(PERSPVALUE) as SumOfPerspvalue, sum(STDDEVC) as SumOfSTDDEVC,
sqrt(sum(STDDEVI*STDDEVI)) AS SumOfSTDDEVI, Sum(EXPVALUE) as SumOfEXPVALUE
from rdm_geoidlob a inner join rdm_anldef b on substring (a.locncode,1,8) = b.lobname
where a.ANLSID in (1) and perspcode = 'gr'
group by b.anlsid, a.portid, a.eventid,a.perspcode
insert into rdm_port (ANLSID, ID, EVENTID, PERSPCODE, PERSPVALUE, STDDEVC, STDDEVI, EXPVALUE)
select b.ANLSID, PORTID, EVENTID, 'rl',
sum(PERSPVALUE) as SumOfPerspvalue, sum(STDDEVC) as SumOfSTDDEVC,
sqrt(sum(STDDEVI*STDDEVI)) AS SumOfSTDDEVI, Sum(EXPVALUE) as SumOfEXPVALUE
from rdm_geoidlob a inner join rdm_anldef b on substring (a.locncode,1,8)) = b.lobname
where a.ANLSID in (1) and perspcode = 'gr'
group by b.anlsid, a.portid, a.eventid,a.perspcode
All Replies
-
Friday, October 02, 2009 8:26 PMWhich insert is giving you the error?
Abdallah, PMP, MCTS -
Friday, October 02, 2009 8:31 PMThe last one. The other three ran fine.
-
Friday, October 02, 2009 8:32 PM
Check underlined. There is an extra bracketI'm getting the error: An expression of non-boolean type specified in a context where a condition is expected, near ')'.
On the code below. Any suggestions Thanks.
insert into rdm_port (ANLSID, ID, EVENTID, PERSPCODE, PERSPVALUE, STDDEVC, STDDEVI, EXPVALUE)select b.ANLSID, PORTID, EVENTID, PERSPCODE,
sum(PERSPVALUE) as SumOfPerspvalue, sum(STDDEVC) as SumOfSTDDEVC,
sqrt(sum(STDDEVI*STDDEVI)) AS SumOfSTDDEVI, Sum(EXPVALUE) as SumOfEXPVALUE
from rdm_geoidlob a inner join rdm_anldef b on substring (a.locncode,1,8) = b.lobname
where a.ANLSID in (1) and perspcode = 'gr'
group by b.anlsid, a.portid, a.eventid,a.perspcode
insert into rdm_port (ANLSID, ID, EVENTID, PERSPCODE, PERSPVALUE, STDDEVC, STDDEVI, EXPVALUE)
select b.ANLSID, PORTID, EVENTID, PERSPCODE,
sum(PERSPVALUE) as SumOfPerspvalue, sum(STDDEVC) as SumOfSTDDEVC,
sqrt(sum(STDDEVI*STDDEVI)) AS SumOfSTDDEVI, Sum(EXPVALUE) as SumOfEXPVALUE
from rdm_geoidlob a inner join rdm_anldef b on substring (a.locncode,1,8) = b.lobname
where a.ANLSID in (1) and perspcode = 'gu'
group by b.anlsid, a.portid, a.eventid,a.perspcode
insert into rdm_port (ANLSID, ID, EVENTID, PERSPCODE, PERSPVALUE, STDDEVC, STDDEVI, EXPVALUE)
select b.ANLSID, PORTID, EVENTID, 'rp',
sum(PERSPVALUE) as SumOfPerspvalue, sum(STDDEVC) as SumOfSTDDEVC,
sqrt(sum(STDDEVI*STDDEVI)) AS SumOfSTDDEVI, Sum(EXPVALUE) as SumOfEXPVALUE
from rdm_geoidlob a inner join rdm_anldef b on substring (a.locncode,1,8) = b.lobname
where a.ANLSID in (1) and perspcode = 'gr'
group by b.anlsid, a.portid, a.eventid,a.perspcode
insert into rdm_port (ANLSID, ID, EVENTID, PERSPCODE, PERSPVALUE, STDDEVC, STDDEVI, EXPVALUE)
select b.ANLSID, PORTID, EVENTID, 'rl',
sum(PERSPVALUE) as SumOfPerspvalue, sum(STDDEVC) as SumOfSTDDEVC,
sqrt(sum(STDDEVI*STDDEVI)) AS SumOfSTDDEVI, Sum(EXPVALUE) as SumOfEXPVALUE
from rdm_geoidlob a inner join rdm_anldef b on substring (a.locncode,1,8)) = b.lobname
where a.ANLSID in (1) and perspcode = 'gr'
group by b.anlsid, a.portid, a.eventid,a.perspcode
Abdallah, PMP, MCTS- Marked As Answer by Kalman TothMicrosoft Community Contributor, Moderator Tuesday, March 06, 2012 6:34 AM
-
Friday, October 02, 2009 8:32 PMI think I see the problem there is an extra parentheses I'll try again.

