I have a query similar like the one below where I need to use multiple string of characters to replace in a single query. I am not too sure how to make sure a and b are passed into the %s in the query. I am getting the error ‘unused arguments (b)’ Any advice please? Thanks Answer sQuote only takes
Tag: rodbc
Sort by one variable, group by another, and select first row in SQL Query in R
I need to apply a procedure in SQL that is easy for me since R, but has been really tortuous in SQL. I need to sort the data from highest to lowest by two variables, group based on another variable, and select the first item in each group. I leave the code that I am trying to pass from R
Why does this work under Microsoft SQL Server Management Studio but not under R?
I received this SQL statement: and it runs nicely under MS SSMS. The relevant part of the result is: When I run it under R I must leave out use MYDATABASE; and be sure I am connected at the right database, which is the case. But the SQL-statement is problematic. The output of: is data frame with 0 columns and
I can’t figure out why my SQL statement doesn’t work
I’m new to SQL and thought I’d write a simple statement to see how it works. I first connect to a database which contains a table called LuPull. All I’m trying to do is select all the rows from LuPull …
How to consider a long “integer” as a string in SQL query when useing R to connect HANA?
I am using R package RODBC to connect HANA. One of the columns is like a long integer, but actually used as a string such as 2772161413309, 4239530000000239. SQL takes such data as integers. In R, …