Importing style with sqlite3: SQL error near line 1: no such table: csl

Hi

I am trying to add my own citation style using sqlite3.exe. If I'm trying to add the file with PATH_TO_SQLITE3\sqlite3 zotero.sqlite < PATH_TO_CSL\fhnwcsl.sql, the error "SQL error near line 1: no such table: csl" appears. Can someone give me a hint if I'm doing something wrong or why the error occures?

My file starts with:
REPLACE INTO csl
VALUES('http://www.zotero.org/namespaces/CSL/fhnw.csl',
'2007-11-23 10:50:00', 'FHNW - Note with Bibliography Style',
'<?xml version="1.0" encoding="UTF-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="note" xml:lang="de">
<info>
.....
...
...

thx
  • Looks good to me - are you sure you have a valid zotero.sqlite as the first arg?
    Does
    SELECT title FROM csl;
    give something reasonable?
  • I just deleted the zotero.sqlite file and reinstalled zotero.
    That is my output (I've put a copy of zotero.sqlite right into my D dive that i dont have to type so much...)

    C:\>d:\sqlite3.exe zotero.sqlite
    SQLite version 3.5.2
    Enter ".help" for instructions
    sqlite> SELECT title FROM csl;
    SQL error: no such table: csl
    sqlite>
  • I suspect that your zotero.sqlite file isn't a valid zotero database in that case.

    .schema
    might show more.
  • ooooh, I got it

    I had to use the full paths for every file, even they all were on the same location:

    PATH_TO_SQLITE3\sqlite3 PATH_TO_ZOTERO\zotero.sqlite < PATH_TO_CSL\fhnwcsl.sql

    Now I have a zotero.sqlite file on my C: drive. It seems like that sqlite3.exe just creates a plain file if no file is inside the loaded path...

    Thanks for everything
Sign In or Register to comment.