Hallo zusammen,
ich bin seit einer halben Woche dran einen Syntaxfehler zun finden der mir mitgeteilt wird. Ich bekomme SQL statement error number -201. Hier ist der SQL Code:
Der Fehler wird mir mit der Zeile 1211 angezeigt welche die fett Markierte ist.
Die Tabelle wird folgendermaßen erstellt:
Ich hoffe jemand hat eine Idee. Der Fehler 201 ist nämlich alles andere als Aussagekräftig.
ich bin seit einer halben Woche dran einen Syntaxfehler zun finden der mir mitgeteilt wird. Ich bekomme SQL statement error number -201. Hier ist der SQL Code:
PHP Code:
insert into ops_tmp(tmp_Mandant, tmp_Klasse, tmp_Kasse, tmp_Kassengr,tmp_KassenName,tmp_Jahr,
[B]tmp_Monat, tmp_Lfd_Nr, tmp_Aufteil, tmp_Beleg_Nr, tmp_Belegdatum,[/B]
tmp_Urs_DM, tmp_Urs_Euro, tmp_Ursaldo, tmp_Ursaldo_SH,
tmp_Anz_Bew, tmp_Lasts_DM, tmp_Lasts_Euro, tmp_Lastsaldo,
tmp_Lasts_SH, tmp_Lastsaldo_proz,tmp_Gesamts_S_DM, tmp_Gesamts_S_EU,
tmp_Gesamts_S, tmp_Gesamts_H_DM, tmp_Gesamts_H_EU,
tmp_Gesamts_H, tmp_Text, tmp_Mahnstufe, tmp_Mahndat1,
tmp_Mahndat2, tmp_Mahndat3, tmp_Mahn_KZ, tmp_Mahnform,
tmp_Gemahnt, tmp_Mahnfäll,
#050406
tmp_Privat_Rechnr, tmp_Ursaldo_Priv ,tmp_Lastsaldo_Priv ,tmp_bezahlt ,
#050406
tmp_Film_Nr, tmp_Gegen_Klasse,
tmp_Kunden_Nr, tmp_Kunden_Ik,tmp_Kundengr, tmp_Rechnung_Nr, tmp_Info_Key,
tmp_Status, tmp_opb_text_1,tmp_Rechnung_Nr_alt,tmp_Bemerktexte, tmp_Datenlieferung,tmp_Datei )
values(r_ops.ops_mandant, r_ops.ops_klasse, r_ops.ops_ktonr, r_ops.ops_gruppe,
r_deb.deb_name_1,
r_ops.ops_rg_jahr, r_ops.ops_rg_monat, r_ops.ops_rg_nr, r_ops.ops_rg_aufteil,
r_ops.ops_beleg_nr, r_ops.ops_beleg_dat, r_ops.ops_ursaldo_dm,
r_ops.ops_ursaldo_e, r_ops.ops_ursaldo, r_ops.ops_ur_sh, r_ops.ops_anzahl_bew,
r_ops.ops_lastsaldo_dm, r_ops.ops_lastsaldo_e, r_ops.ops_lastsaldo,
r_ops.ops_last_sh,r_ops.ops_lastsaldo_proz,
r_ops.ops_gessaldo_s_dm, r_ops.ops_gessaldo_s_e,
r_ops.ops_gessaldo_s, r_ops.ops_gessaldo_h_dm, r_ops.ops_gessaldo_h_e,
r_ops.ops_gessaldo_h, r_ops.ops_text, r_ops.ops_mahnstufe,
r_ops.ops_mahndat_1, r_ops.ops_mahndat_2, r_ops.ops_mahndat_3,
r_ops.ops_mahn_kz, r_ops.ops_mahn_form, r_ops.ops_mahn_durchf,
r_ops.ops_mahn_faellig,
privat_rechnr, ursaldo_priv, lastsaldo_priv, bezahlt_jn,
r_ops.ops_film_nr, r_ops.ops_gegen_klasse,
r_ops.ops_gegen_ktonr,r_kre.kre_ik, r_ops.ops_gegen_gruppe, r_ops.ops_rechnr,
r_ops.ops_bmt_key, r_ops.ops_status,
r_opb.opb_text_1, rechnr_han_alt,r_icont.icont_info,datum_datlief,dat_datei)
Die Tabelle wird folgendermaßen erstellt:
PHP Code:
create temp table ops_tmp(
tmp_Mandant smallint, tmp_Klasse smallint, tmp_Kasse integer,
tmp_Kassengr smallint,tmp_KassenName char(40), tmp_Jahr smallint, tmp_Monat smallint,
tmp_Lfd_Nr smallint, tmp_Aufteil smallint, tmp_Beleg_Nr integer,
tmp_Belegdatum date, tmp_Urs_DM money, tmp_Urs_Euro money,
tmp_Ursaldo money, tmp_Ursaldo_SH char(1), tmp_Anz_Bew smallint,
tmp_Lasts_DM money, tmp_Lasts_Euro money, tmp_Lastsaldo money,
tmp_Lasts_SH char(1), tmp_Lastsaldo_proz decimal(8,1),
tmp_Gesamts_S_DM money, tmp_Gesamts_S_EU money,
tmp_Gesamts_S money, tmp_Gesamts_H_DM money, tmp_Gesamts_H_EU money,
tmp_Gesamts_H money, tmp_Text char(13), tmp_Mahnstufe smallint,
tmp_Mahndat1 date, tmp_Mahndat2 date, tmp_Mahndat3 date,
tmp_Mahn_KZ smallint, tmp_Mahnform smallint, tmp_Gemahnt char(1),
tmp_Mahnfäll date,
#050406
tmp_Privat_Rechnr int, tmp_Ursaldo_Priv money,tmp_Lastsaldo_Priv money,tmp_bezahlt char(1) ,
#050406
tmp_Film_Nr integer, tmp_Gegen_Klasse smallint,
tmp_Kunden_Nr integer, tmp_Kunden_Ik decimal(9,0),tmp_Kundengr smallint,
tmp_Rechnung_Nr char(20),
tmp_Info_Key integer, tmp_Status smallint,
tmp_opb_text_1 char(10), tmp_Rechnung_Nr_alt char(20),
tmp_Bemerktexte char(374) ,
tmp_Datenlieferung date ,
tmp_Datei char(12)
-201 A syntax error has occurred.
This general error message indicates mistakes in the form of an SQL statement. Look for missing or extra punctuation (such as missing or extra commas, omission of parentheses around a subquery, and so on), keywords misspelled (such as VALEUS for VALUES), keywords misused (such as SET in an INSERT statement or INTO in a subquery), keywords out of sequence (such as a condition of "value IS NOT" instead of "NOT value IS"), or a reserved word used as an identifier.
Database servers that provide full NIST compliance do not reserve any words; queries that work with these database servers might fail and return error -201 when they are used with earlier versions of Informix database servers.
The cause of this error might be an attempt to use round-robin syntax with CREATE INDEX or ALTER FRAGMENT INIT on an index. You cannot use round-robin indexes.
This general error message indicates mistakes in the form of an SQL statement. Look for missing or extra punctuation (such as missing or extra commas, omission of parentheses around a subquery, and so on), keywords misspelled (such as VALEUS for VALUES), keywords misused (such as SET in an INSERT statement or INTO in a subquery), keywords out of sequence (such as a condition of "value IS NOT" instead of "NOT value IS"), or a reserved word used as an identifier.
Database servers that provide full NIST compliance do not reserve any words; queries that work with these database servers might fail and return error -201 when they are used with earlier versions of Informix database servers.
The cause of this error might be an attempt to use round-robin syntax with CREATE INDEX or ALTER FRAGMENT INIT on an index. You cannot use round-robin indexes.
Comment