Subject | check for exist with assignment |
---|---|
Author | Daniel L. Miller |
Post date | 2013-11-10T06:31:41Z |
Building a procedure - why is this rejected:
if ( exists( select ID from CITIES where CITY = :NEWCITY into :NEWID ) )
then begin
suspend;
end
the error is on the 'into' word
but this is accepted:
if ( exists( select ID from CITIES where CITY = :NEWCITY ) ) then begin
select ID from CITIES where CITY = :NEWCITY into :NEWID;
suspend;
end
--
Daniel
if ( exists( select ID from CITIES where CITY = :NEWCITY into :NEWID ) )
then begin
suspend;
end
the error is on the 'into' word
but this is accepted:
if ( exists( select ID from CITIES where CITY = :NEWCITY ) ) then begin
select ID from CITIES where CITY = :NEWCITY into :NEWID;
suspend;
end
--
Daniel