2

In a regular Query on Oracle SQL we could use:

var_user VARCHAR2(256) := 'eduard'
select * from a_table where user_name = var_user

If I use this code in Delphi's TQuery.SQL.Text I get the error Incorrect Token Followed By ":"..

I believe it is happening because Delphi uses : symbol in this case to specify a parameter inside TQuery.SQL.Text to be replaced by the values set at TQuery.Params[].

What I really want to do is SomeVarInsideSQL := :MyParam and I can't because of that error. What should I do? (delphi-xe3-zeoslib)

kobik
  • 21,001
  • 4
  • 61
  • 121
NaN
  • 8,596
  • 20
  • 79
  • 153

1 Answers1

2

You need to escape : to :: if you have to bypass specific TQuery Parameter parsing.

kobik
  • 21,001
  • 4
  • 61
  • 121