4

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: – Peter M. May 27 '15 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 May 27 '15 at 17:18
0

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()).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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