Reputation: 5
I would like to know how to mix up the function substr and quotes delimiter in sql query. such query send me the error invalid query
SQL>Insert into employee (name)
values(substr(q'<ALEXANDRE SA'A DONJUAN LA FAMILLE ANDREA>',1,20));
I expect this query to insert the name as ALEXANDRE SA'A DONJU thank you to help me
Upvotes: 0
Views: 169
Reputation: 152
Insert into employee (name) values(substr(q'[ALEXANDRE SA'A DONJUAN LA FAMILLE ANDREA']',1,20));
Upvotes: 0
Reputation: 1587
after changing to propera usage of quote operator:
Insert into employee (name)
values(substr(q'>ALEXANDRE SA'A DONJUAN LA FAMILLE ANDREA>',1,20));
Upvotes: 0
Reputation: 30815
Your usage of the quote operator q
and substr
is fine - you're just missing a closing )
:
Insert into employee (name)
values(substr(q'<ALEXANDRE SA'A DONJUAN LA FAMILLE ANDREA>',1,20));
Upvotes: 2