Closed crbsram closed 1 year ago
Update: _, err := conn.Query("set define off") if err !=nil { fmt.Println("error in setdefine off") }
_, err := conn.Query(" select name from user where name = 'test & test'") if err != nil { fmt.Println("error in executing the query") }
while writing this code received error from Oracle like given below:
ORA-00922: missing or invalid option
Let me know if I am missing anything.
Thanks C.R.Bala
hi @crbsram
SET DEFINE ON/OFF
is an option of SQL Plus not oracle
so your code
_, err := conn.Query(" select name from user where name = 'test & test'")
if err != nil {
fmt.Println("error in executing the query")
}
will work without SET DEFINE OFF
Hi Team
Want to know how to add these alter session set current_schema = user set define off
during the connection initialization similar to onInit in godror. So that entire connection usage these will be inherited.
Pls let us know this is possible.