This is the object I want to read from:
 > geni_FClow
      geni  FC_low
1 AF039390 -1.704
2 AF039390 -1.704
3 AF116456  1.501
4 AJ250915  1.656
5 AJ250915  1.656
6 AF326592  1.835

This is the command I'm trying to use (as Cui, Wenwu suggested)
 > Sqlcmd <- paste("update GO_DC5_vs_50PC3_apoptosis set FC_low = ", 
geni_FClow$FC_low[i], " where geni like ", geni_FClow$geni[i], sep = "")
 > for (i in 1:nrow(geni_FClow)){
+ dbSendQuery(con, Sqlcmd)
+ }

and this is the error I get:
Errore in mysqlExecStatement(conn, statement, ...) :
        RS-DBI driver: (could not run statement: Unknown column 
'AF039390' in 'where clause')

 > is.data.frame(geni_FClow)
[1] TRUE

Thanks

Alessandro


Sean Davis ha scritto:
> Alessandro Bruselles wrote:
>   
>> Thanks to all who tried to help me,
>> but none of the suggested solutions worked for me,
>> I still didn't manage to do the loop...
>> How else can I do to iteratively update my db?
>>     
>
> Alessandro,
>
> You will probably want to post the code that you tried and what errors
> you received.  The way you are trying is the correct way of performing
> the update, but there are a few details to get right before it will work.
>
> Sean
>
>   

	[[alternative HTML version deleted]]

