>Hi all,
>
>I am trying to generate a SQL statement interactively based on values selected by the user. I am storing the final SQL statement in a memory variable of the form as shown below -
>
>cVar = "Select * From MY_TABLE WHERE Col1 = 'XXXX'"
>
>How can a execute this query which is stored in this variable ?
>
>Sincere thanks in advance.
You could do &cVar however I suggest you to break it into parts like this :
select &lcFieldList ;
from (lcFrom) ;
&lcWhere ;
&lcOrderBy
etc.
Cetin