Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Question on PL/SQL statement.
In article <1150295218.092853.323630_at_f6g2000cwb.googlegroups.com>,
says...
> Thanks for your insight. I appreciate that.
>
> How about this:
>
> EXEC SQL SELECT COUNT(*)
> INTO :rowcount
> FROM MY_LIST L1
> WHERE AND L1.batch_id = '1'
> AND L1.send_delete_ind = 'Y'
> OR L1.send_delete_ind = 'N';
Your problem here is mixing AND with OR
you probably need
WHERE AND L1.batch_id = '1' AND (L1.send_delete_ind = 'Y' or L1.send_delete_ind = 'N');
or perhaps
WHERE AND L1.batch_id = '1' AND L1.send_delete_ind in ('Y','N');
-- jeremyReceived on Wed Jun 14 2006 - 11:48:22 CDT