2

I have an quite simple query

SELECT id FROM table where ID in &data

When I run this SQL I am prompted to type in some values to &data.

I would like to be able to select several id's using this. i.e. &data = "11,12,13"

but then I get an error ORA-00933.

Ive tried with:

11,12,13
'11,12,13' -> ORA-01722
'11','12','13'

Any ideas?

Ishamael
  • 51
  • 1
  • 2
  • 9

1 Answers1

6

Try to add ():

SELECT id FROM table where ID in (&data)

the input values should be '11,12,13'

or try to add (''):

SELECT id FROM table where ID in (&data)

the input values should be 11,12,13

Robert
  • 25,425
  • 8
  • 67
  • 81