I'm using oracle 10g plsql procedures for inserting and listing, but if we have any special characters like ' (single quote ) and & etc. query fails. How to handle special characters in plsql?
before:
lquery := 'select count(id) into lCount
From
dual
where
name = '||iName||'
and Id= '||iId
after:
select into lCount
From
dual
where
Id= iId
and name = iName;
after changing the query its working fine. Problem is if we keep variable like name value inside single quotes some times query wont execute for special characters like ' , " etc after changing query its working fine.