You can use TextMerge:
SET TEXTMERGE ON
SET TEXTMERGE TO MEMVAR lcQuery NOSHOW
\INSERT INTO <MiTable>(field1, campo2, campo3
\\ campo3, Campo3.... Campo....
\\ otrocampo, otroCampo
\\ VALUES (?MyVar,?MyVar2....
SET TEXTMERGE TO
SET TEXTMERGE OFF
lcQuery = STRTRAN(lcQuery, SPACE(2), SPACE(1))
Note I should use standar INSERT INTO Table(Fields) VALUES(?MiVar) instead INSERT ... SET.
Hello everybody!
What is the best way to pass very long SQL_Commands to an MY_SQL Server ??
Until now i do like this:
l_command = 'insert into t_table set data1 = "abc",data2= "yxz"..........'
l_ok= SQLEXEC(l_connection,l_command')
If the length of l_commands grows to more then 254 characters,
i split the task in two parts
first insert with keyfields and half of fields, then updating the inserted record with the rest of the fields ??????????
I believe that there must be a better way to handle this!
What about very long and complex select commands, that can't be split??
Any idea welcomedm Best regards
Albert