Skip to content

RODBC to MS SQL Server update error

1 message · Bond, Stephen

#
Is this a bug:

Trying to update when the where condition gives zero rows throws an error on MS SQL server
[1] ProcessDate       SourceSystemId    AccountNumber     Xref1             
<0 rows> (or 0-length row.names)

sqlQuery(pipe,"update ComDetailCurrent set RateTypeId=1 where RateTypeId is null;")
[1] "[RODBC] ERROR: Could not SQLExecDirect 'update ComDetailCurrent set RateTypeId=1 where RateTypeId is null;'"

On the other hand with MySQL
[1] "No Data"

Please, try to update a table on SQL server and give it a where condition such that zero rows will be updated. And post the result on this forum :-)
Thanks everybody and have a great day.

Stephen B