Posts

Showing posts from February 27, 2019

Cersei Lannister

Image
Cersei Lannister Lena Headey como Cersei Lannister Outro(s) nome(s) Rainha dos Ândalos e dos Primeiros Homens (TV) Protetora do Reino Senhora das Terras Ocidentais Senhora de Rochedo Casterly Luz do Oeste Rainha Viúva Rainha Regente Sexo Feminino Ocupação Rainha dos Sete Reinos (TV) Família Casa Lannister Tywin Lannister (pai) Joanna Lannister (mãe) Jaime Lannister (irmão) Tyrion Lannister (irmão) Kevan Lannister (tio) Lancel Lannister (primo) Casa Baratheon Robert Baratheon (marido) Joffrey Baratheon (filho) Myrcella Baratheon (filha) Tommen Baratheon (filho) Status Viva Criado por George R. R. Martin Primeira aparição Livros: A Game of Thrones (1996) TV: "Winter is Coming" (2011) Jogo: "Iron from Ice" (2014) Interpretado por Lena Headey Nell Williams (criança)

RODBCext replace NA with null in query

Image
0 I've set up a connexion between R and SQL (PostgreSQL 9.5) using the package Rodbcext, a layer on top of Rodbc that allow parametrized queries. I'm trying to build a R function that delete some specific data in some specific table. delete_SQL = function(data, table){ ch = odbcConnect(base,"postgres") names = sqlColumns(channel=ch,table,schema="public",catalog = base)$COLUMN_NAME query = paste0("DELETE FROM public.",table," WHERE ",paste0(names," = ?",collapse = " and "),";") #query exemple : DELETE FROM public.protection WHERE id = ? and nom = ? and page = ? and type = ? and observation = ?; sqlPrepare(ch, query) sqlExecute(ch,data=data) odbcClose(ch) } My problem is that if there is some NA values in my dat