-
if and or
I need to verify a few statements before processing. If any of these statements are true I need to do something. I tried
if exists (select patid from pat..patientallergies where patid = @patid and facid = @newfacid )
or
if exists (select patid from pat..reorders where patid = @patid and facid = @newfacid )
or
if exists (select patid from pat..ReorderDirections where patid = @patid and facid = @newfacid )
begin
However this syntax is not allowed. What would be the proper way to do this?
-
Almost had it:
if exists (select patid from pat..patientallergies where patid = @patid and facid = @newfacid )
or
exists (select patid from pat..reorders where patid = @patid and facid = @newfacid )
or
exists (select patid from pat..ReorderDirections where patid = @patid and facid = @newfacid )
begin
-
Duh, I missed the obvious. thanks, it must be Monday