Help: Query SQL for PATSTAT

Hannover_student

Neuer Benutzer
Beiträge
2
Hey everyone,

concerning my master thesis I wish to retreive data from PATSTAT (using SQL language).

My topic regards retreiving patent data for Germany in the time frame 2010-2020
Including information of the patents regarding "cpc_class symbols" and "addresses of the inventors"

I found a query on the internet, which included the same information, just for one region of Germany (I just slightly modifies the code for whole Germany). Sadly I just get error terms. Could you help me adjusting the query code?

(In the appendix you will find my code)

Best regards,

Hannover_student
 

Anhänge

  • PATSTAT-code.txt
    1,4 KB · Aufrufe: 6
Werbung:
this is a german speaking forum, and you haven't provided enough information to understand your problem. Which database, table structure, error messages to name some of the missing information.
 
Hallo akretschmer,

vielen Dank für die schnelle Rückmeldung!

Die Datenbank ist vom Europäischem Patent Amt (PATSTAT online)
Die Tabellen-Struktur habe ich jetzt nochmal angehängt (patstat_data_catalog.pdf)
Als Error bekomme ich
[Error Code: 103, SQL State: S0004] The identifier that starts with 'CREATE VIEW LSTech_i AS SELECT DISTINCT tls207_pers_appln.APPLN_ID FROM tls207_pers_appln INNER JOIN tls206_person ON tls207_per' is too long. Maximum length is 128.

Vielen Dank!
 

Anhänge

  • patstat_data_catalog.pdf
    40,7 KB · Aufrufe: 1
ich vermute mal, durch die "" wird das nicht als SQL-Befehl, sondern als Bezeichner interpretiert:

Code:
edb=*> "'CREATE VIEW LSTech_i AS SELECT DISTINCT tls207_pers_appln.APPLN_ID FROM tls207_pers_appln INNER JOIN tls206_person ON tls207_per'";
HINWEIS:  Bezeichner »'CREATE VIEW LSTech_i AS SELECT DISTINCT tls207_pers_appln.APPLN_ID FROM tls207_pers_appln INNER JOIN tls206_person ON tls207_per'« wird auf »'CREATE VIEW LSTech_i AS SELECT DISTINCT tls207_pers_appln.APPL« gekürzt

Zwar eine andere Fehlermeldung, aber es wird halt das als ein Bezeichner interpretiert, der als solcher zu lang und daher gekürzt wird. Das hat Ähnlichkeit mit Deinem Fehler. Wir wissen immer noch nicht was für eine DB, was für ein Client etc.
 
Nachtrag:

weiteres Beispiel und verwendetes DB-System:

Code:
edb=*> select 1 as "'CREATE VIEW LSTech_i AS SELECT DISTINCT tls207_pers_appln.APPLN_ID FROM tls207_pers_appln INNER JOIN tls206_person ON tls207_per'" from dual;
HINWEIS:  Bezeichner »'CREATE VIEW LSTech_i AS SELECT DISTINCT tls207_pers_appln.APPLN_ID FROM tls207_pers_appln INNER JOIN tls206_person ON tls207_per'« wird auf »'CREATE VIEW LSTech_i AS SELECT DISTINCT tls207_pers_appln.APPL« gekürzt
 'CREATE VIEW LSTech_i AS SELECT DISTINCT tls207_pers_appln.APPL
-----------------------------------------------------------------
                                                               1
(1 row)

edb=*> select version();
                                                                               version                                                                               
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
 PostgreSQL 13.1 (EnterpriseDB Advanced Server 13.1.4 (Ubuntu 13.1.4-1+ubuntu4)) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit
(1 row)
 
Werbung:
Zurück
Oben