I am creating an SQL statement from an array. The values in the array supply the values for the WHERE clause of my SQL statement. Here's my code:
**************
Dim strPostingSQL, strWhere, iLoop
strPostingSQL = "DELETE FROM tblCurrentJobs WHERE "
For iLoop = LBound(arrPostings) to UBound(arrPostings)
strWhere = strWhere & "PostingID = " & _
Trim(arrPostings(iLoop)) & " or "
Next
strPostingSQL = strPostingSQL & strWhere
***************
My SQL statement is created fine, but it always has an extra "or" at the end of the statement. How do I get rid of the extra "or"?
Thanks
**************
Dim strPostingSQL, strWhere, iLoop
strPostingSQL = "DELETE FROM tblCurrentJobs WHERE "
For iLoop = LBound(arrPostings) to UBound(arrPostings)
strWhere = strWhere & "PostingID = " & _
Trim(arrPostings(iLoop)) & " or "
Next
strPostingSQL = strPostingSQL & strWhere
***************
My SQL statement is created fine, but it always has an extra "or" at the end of the statement. How do I get rid of the extra "or"?
Thanks