Reputation: 399
I am aware there are many questions related to this issue. I almost reviewed all but no suggestions could solve my problem so far. I have a query like below and this gives me ORA-00911: invalid character error. I dont have semicolon at the end, no special characters inside the query. I could not figure out what the problem is. Any helps would be appreciated.
P.S:I am using "System.Data.OracleClient" as provider. And there is no mistake in connection string because i can make work some other queries
orCmd2.Connection = orConnection;
orCmd2.CommandType = CommandType.Text;
orCmd2.CommandText = "select distinct p.id,
p.tn, p.ptar, s.bno, s.pid from a.t_srtalı s,
a.V_PVIEW p where s.id=:id and s.pid=p.pid";
orCmd2.Parameters.AddWithValue("id", pid);
orreader2 = orCmd2.ExecuteReader();
Upvotes: 0
Views: 1229
Reputation: 31
where s.pid=:pid and s.polid=p.polid"
You have a "=:" in a WHERE-Clause
WHERE S.PID = PID AND S.POLID = P.POLID
Maybe change your variable from PID to somthing like E_PID to mark it extern...
Upvotes: 0