I am writing this query in HP ALM 11.52 and facing the error "Conversion failed when converting the varchar value 'userid' to data type int"

Query is

select * 
from Testcycl
join Audit_Log on tc_test_id = au_entity_id

I know the userid is a string and it is unable to convert it to data type int. How can we resolve this error in the HP ALM Query builder?

  • I voted to close this question here and move it to Stack Overflow. You will get better answers there - or likely the is answer there if you just search a bit. Google is your friend: Commented May 27, 2015 at 14:07
  • 1
    Peter, I'm not so sure. There's no guarantee that the query you enter into HP ALM is actual SQL or if it's just "SQL-ish". This is certainly on topic here, and is in all honest a well worded question (does need a small amount of formatting, but that's minor.)
    – corsiKa
    Commented May 27, 2015 at 17:18

1 Answer 1


Well, I think that the problem is that you are trying to search for all types of events and since AU_ENTITY_ID allow NULLs you might receive such error.

Please try to use LEFT/RIGHT/FULL JOIN (according to what you are trying to achieve) and not using INNER JOIN since converting NULL to INT value might result a failure (unless you are protecting your search with ISNULL()).

  • If that is correct, wouldn't a WHERE AU_ENTITY_ID IS NOT NULL work even better? Commented May 22, 2021 at 13:57

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.