6

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?

2
  • 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: 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
    May 27, 2015 at 17:18

1 Answer 1

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

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

Your Answer

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

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