loud and clear
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optou
+1
Warm Regards,
Asit Dhal
http://bit.ly/193ASIT
On 8/20/2016 2:14:47 AM, Shawn Milochik wrote:
To everyone participating in this thread: Google "help vampire"
To OP: don't be one.
To everyone else: Don't feed them.
--
You received this message because you are subscribed to the Google Groups
To everyone participating in this thread: Google "help vampire"
To OP: don't be one.
To everyone else: Don't feed them.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an e
Yh, thanks so much. but still getting this error when i run it.
undefined: sql in sql.Open
>
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsu
sth. like
records, err := reader.ReadAll()
if err != nil {
log.Fatal(err)
}
db, err := sql.Open("sqlite", "memory")
if err != nil {
log.Fatal(err)
}
defer db.Close()
tx, err := db.Begin()
if err != nil {
log.Fatal(err)
}
stmt, err := tx.Prep("INSERT INTO my_table (a, b, c) VALUES (?,
This is a snippets of the first part of my code
package main
import ( "encoding/csv" "fmt" "os" )
func main() {
file, err := os.Open("Account_balances.csv")
if err != nil {
fmt.Println("Error", err)
return
}
defer file.Close()
reader := csv.NewReader(file)
record, err := reader.Rea
There is a csv package in golang
https://golang.org/pkg/encoding/csv/
There is a sql package in golang too
https://golang.org/pkg/database/sql/
For sqlite
https://godoc.org/github.com/gwenn/gosqlite
You need to use csv parser and insert into sqlite database.
Warm Regards,
Asit
http://bit.ly/19