Displaying 2 results from an estimated 2 matches for "autoincremental".
Did you mean:
autoincrement
2011 Feb 01
1
sqlsave and mysql database with autoincremental column
Hello,
I'm trying to modify my r-script to use RODBC instead of DBI/RMySQL (no more
ready-to-use package for windows).
I would like to copy a data.frame of 44 columns to a table of 45 columns
(the 45th is an autoincremental column).
With the following commands,
colnames(df)<- a vector with the names of the 44 columns
ch<-odbcDriverConnect(connection="SERVER=localhost;DRIVER=MySQL ODBC 5.1
Driver;DATABASE=my_db;UID=usercount;PWD=my_pwd;case=tolower")
sqlSave(ch,my_df, "my_table", append = T...
2005 Dec 21
7
use of SET command in find_by_sql
Hi,
I''m trying to execute something like this method in a model:
def self.sql_for_rankings()
sql = "SET @counter:=0;"
sql << " SET @counter:=0;
SELECT *, @counter:=@counter+1 AS rank
FROM testscores. "
find_by_sql(sql)
end
Where the new rank column is a kind of autoincrementer inside of