R
rft
I would like to pass a list through a parameter, to allow a user to specifiy
which records to retrieve.
The following query returns 4 rows:
select *
from branch
where branchno in ('1','9','21',34');
Add a parameter:
select *
from branch
where branchno in ([p_branchno]);
--branchno is a text field
when executed, prompted for:
Enter paremater value, p_branchno: '1','9','21',34'
no row returned
execute again
Enter paremater value, p_branchno: 1 --(without single quotes)
1 row returned
thanks in advance!
which records to retrieve.
The following query returns 4 rows:
select *
from branch
where branchno in ('1','9','21',34');
Add a parameter:
select *
from branch
where branchno in ([p_branchno]);
--branchno is a text field
when executed, prompted for:
Enter paremater value, p_branchno: '1','9','21',34'
no row returned
execute again
Enter paremater value, p_branchno: 1 --(without single quotes)
1 row returned
thanks in advance!