Is this a bug:

Trying to update when the where condition gives zero rows throws an error on MS 
SQL server

> sqlQuery(pipe,"select * from ComDetailCurrent where RateTypeId is null;")
 [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
> sqlQuery(mys,"update rate_hist set val=5.0 where dtend<'1986-05-01'")
[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

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to