qryCIDtemp.SQL.Text := 'drop table if exists #tempCID'; //apaga a tabelas temporária
Delphi returns the following message at runtime:
Invalid use of keyword Token: if Line Number: 1.
If anyone can help me, I'm very grateful.
EDIT:
Test with the suggestion of the answer below:
I did as you suggested:
qryCIDtemp.SQL.Text := 'if object_id('#tempCID','U') Is not null drop table #tempCID'; //apaga a tabelas temporária
and also did not work. Now the error is compile. delphi returns me:
Missing operator or semicolon. Statement expected, but expression of type 'String' found.
Do you have another idea?