Oracle Parameters with IN statement?

前端 未结 5 1428
忘了有多久
忘了有多久 2020-11-30 08:14

Got a c#.net app which I need to modify. The query at the moment effectively does this:

select * from contract where contractnum = :ContractNum
5条回答
  •  时光说笑
    2020-11-30 08:37

    Have yet to find a db that supports evaluating a single string variable containing commas to separate as the sole IN clause.

    Your options are to substring the variable so the comma delimited variable contents are turned into rows, so you can then join onto this. Or to use dynamic SQL, which is a SQL statement constructed as a string in a sproc before the statement is executed.

提交回复
热议问题