Hello team,
I have a co-worker out on vacation and I was asked to step in and find the issue with this statement below. We have an excel add-in that has a excel module with the following code:
My first instinct is to look at syntac..syntax looks alright. Second would be to make sure the columns exists in the tables..I will list the current columns out for the tables in questions:
Table 1 - DrawingProgress(ProgressDrawingID, DrawingID, ProgressID, Progress, ProgressDate, EntryDate)
Table 2 - tmpJuniorProgress(ContractorDrawingID, ProgressTypeName, Weight, DataDate, Progress)
Table 3 - DrawingProgressType(ProgressType, ProgressTypeName)
I think there may be an invalid value type in the DrawingProgressType Table. Does anyone see anything that sticks out? Thank you again for assisting. Just trying to step in an assist someone who is out.
I have a co-worker out on vacation and I was asked to step in and find the issue with this statement below. We have an excel add-in that has a excel module with the following code:
Code:
Function ImportProgressSql() As String
ImportProgressSql = _
"INSERT INTO DrawingProgress(DrawingId, ProgressId, Progress, ProgressDate, EntryDate) " & vbCrLf & _
"SELECT DrawingId, ProgressTypeId, Progress, DataDate, Now() AS EntryDate " & vbCrLf & _
" FROM ((tmpJuniorProgress" & Environ("USERNAME") & " jp " & vbCrLf & _
" LEFT JOIN Drawings d " & vbCrLf & _
" ON jp.ContractorDrawingId = d.ContractorDrawingId) " & vbCrLf & _
" LEFT JOIN DrawingProgressType pt " & vbCrLf & _
" ON jp.ProgressTypeName = pt.ProgressTypeName) " & vbCrLf & _
" WHERE CStr(DrawingId) + CStr(ProgressTypeId) + CStr(Progress) + CStr(DataDate) " & vbCrLf & _
" NOT IN (SELECT CStr(DrawingId) + CStr(ProgressTypeId) + CStr(Progress) + CStr(DataDate) FROM DrawingProgress)"
My first instinct is to look at syntac..syntax looks alright. Second would be to make sure the columns exists in the tables..I will list the current columns out for the tables in questions:
Table 1 - DrawingProgress(ProgressDrawingID, DrawingID, ProgressID, Progress, ProgressDate, EntryDate)
Table 2 - tmpJuniorProgress(ContractorDrawingID, ProgressTypeName, Weight, DataDate, Progress)
Table 3 - DrawingProgressType(ProgressType, ProgressTypeName)
I think there may be an invalid value type in the DrawingProgressType Table. Does anyone see anything that sticks out? Thank you again for assisting. Just trying to step in an assist someone who is out.