I try
- Code: Select all Expand view
nErr := oSql:exec("INSERT INTO &cKnjiga (GK_Godina, GK_Firma, GK_Nalog, GK_Datum, GK_Dokum, GK_Opis, GK_Konto, GK_Analit, GK_DugPoc, GK_PotPoc, GK_Duguje, GK_Potraz)"+;
" SELECT GK_Godina, '" + mFirma_id + "', GK_Nalog, GK_Datum, GK_Dokum, GK_Opis, GK_Konto, GK_Analit, GK_DugPoc, GK_PotPoc, GK_Duguje, GK_Potraz FROM Infobit@Server:Spe_Knjiga"+;
" WHERE &cFirma .Gk_Godina= '" + mObrGod + "'")
but get a syntax error:
Detaljan opis greške
--------------------
Error SR_ODBC/0 SQLExecDirect Error
42000 - 102 - [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near 'Infobit@Server:'.
Command sent to database :
INSERT INTO TMP_MISA_KNJIGA (GK_Godina, GK_Firma, GK_Nalog, GK_Datum, GK_Dokum, GK_Opis, GK_Konto, GK_Analit, GK_DugPoc, GK_PotPoc, GK_Duguje, GK_Potraz) SELECT GK_Godina, 'SPE', GK_Nalog, GK_Datum, GK_Dokum, GK_Opis, GK_Konto, GK_Analit, GK_DugPoc, GK_PotPoc, GK_Duguje, GK_Potraz FROM Infobit@Server:Spe_Knjiga WHERE SPE_KNJIGA .Gk_Godina= '2015'
Steatment handle :
Connection handle :
RetCode : -1
- RollBack executed.
Regards