0

I have written aa insert query in a stored procedure...

   INSERT INTO `ascencom_soa2`.`rardata` (`threatDescription`,`rtpControlObjective`,
  `rtpNonTechnical`,`rtpISOControl`,
  `rtpWorkInstructions`,`VulnerabilityDescription`,
  `assetname`,`companyid`,`assetid`)

  VALUES (threatDesc,rtpcontrol,
  rtpNon,rtpISO,
  rtpWork,rtpvulnarabilityDesc,
  idAsset,idCompany,idAssetType);

Here threatDesc, rtpcontrol, trpNon.... are variables and are initialized before the insert query is executed...

but it is give me error...

1054 : Unknown column 'threatDesc' in 'field list'

please help me with this problem

1
  • Are you trying to do this from within a MySQL client, or via PHP? Commented Mar 9, 2012 at 5:37

2 Answers 2

2
@threatDesc, @rtpcontrol, @trpNon...
Sign up to request clarification or add additional context in comments.

Comments

0

It means there is no column threatDesc so you can't assign it as a value. My guess is that you either meant to put quotes around that and save it as a string, OR you are trying to assign from another table and you need to say tableName.threatDesc OR something else entirely.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.