0

I have one table named, "Context". It has multiple columns. One column is "Job_Query" where we usually store business SQL query.

we usually insert query like this:

insert into Context(Job_Query) Values( ' Select name, job, dept_no, cnct_sttus from employees where name= \'John\' and cnct_sttus= \'A\' and dept_no=20 ')

when we pass any string value in query, we usually use 'John' , 'A' values like this to insert the whole query as a text in Context table. But now I have to insert the query where cnct_sttus= 'N/A'

But when am writing query like below:

insert into Context(Job_Query) Values( ' Select name, job, dept_no, cnct_sttus from employees where name= \'John\' and cnct_sttus= \'N/A\' and dept_no=20 ')

Its throwing exception like "error code: 1292. truncated incorrect double value".

Can anyone help me to resolve this issue.

nodev_101
  • 99
  • 10

0 Answers0