Oracle Variable Passing Test

view story

http://www.unix.com – Hi, I am trying to get the oracle variables and pass the values in sql placed in procedure. VARIABLE vstat='ASDS,FGDS,VCGD,VCXC' Query : select distinct dept from College where section in ('C','D') AND CODES ='' AND NAMES IN ('RAJ','SAM'); I want CODES values to be taken from vstat variable one by one in loop . Here 4 values are passed seperated with comma. I need this query running for individual codes 4 times. Based on num of parameter passed query should loop.u Thanks . (HowTos)