Link to home
Start Free TrialLog in
Avatar of Jhovyn Marcos
Jhovyn Marcos

asked on

Conversion failed when converting the varchar value 'Id' to data type int

I got this error when trying run my sql query... "Conversion failed when converting the varchar value 'Id' to data type int"

SELECT *
FROM History
INNER JOIN Header
ON History.Id = Header.docId

Open in new window


Please help me :(
ASKER CERTIFIED SOLUTION
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Try
cast(column1 as int)

Open in new window


and if problem does persists, it can be due to data problem.