Click here to Skip to main content
15,923,168 members

Comments by Member 14057347 (Top 8 by date)

Member 14057347 20-Nov-18 12:10pm View    
That was a typo on my part. The actual query has no errors in column names.
Member 14057347 20-Nov-18 11:31am View    
The INSERT statement as I am truncating the table and repopulating it every time. Now that I think of it, the Update is redundant here (old code)
Member 14057347 20-Nov-18 11:30am View    
Yes, query is trying to convert PartNote to int when it shouldn't. It is defined as nvarchar(500) in the source table, also being cast as nvarchar(500) when creating a temp table (which runs fine on it's own) and is also defined as nvarchar(500) in destination table. Why is SQL trying to convert it to Int? I know this field has Czech characters such as "Forma č" and also Chinese. Will that have anything to do with this error?
Member 14057347 20-Nov-18 10:50am View    
Also, when I CAST this column while creating my temp table, it does not throw any errors. I also tried creating a proper table instead of temp table to see if that made a difference.
It only throw an error when it tried to INSERT the rows in the destination table. I have also tried to recreate the destination table to make sure there where no data type conflicts.
Member 14057347 20-Nov-18 10:36am View    
Nvarchar(500)

I didn't mean to repost. New to the site and ended up creating 2 questions instead of one. Is there a way to merge them together?