Re: Change the table in a DELETE statement in ECPG

Поиск
Список
Период
Сортировка
От Michael Meskes
Тема Re: Change the table in a DELETE statement in ECPG
Дата
Msg-id 20000502200537.A602@fam-meskes.de
обсуждение исходный текст
Список pgsql-interfaces
On Fri, Apr 28, 2000 at 05:05:10PM -0700, Matthew Denny wrote:
> Is it possible to create a DELETE statement of the form:
> 
> EXEC SQL DELETE FROM :foo;

No.

> Where foo holds a table name; I have tried declaring foo as both a
> VARCHAR and a regular C string (char*, NULL-term.) but both seem to
> generate a parse error.  Is my only option to use dynamic SQL

Yes. 

> statements (e.g with the PREPARE and EXECUTE commands)?

Yes, that's how it is supposed to work.

Michael
-- 
Michael Meskes                         | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz    | Go Rhein Fire!
Tel.: (+49) 2431/72651                 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De           | Use PostgreSQL!


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Request for 7.0 JDBC status
Следующее
От: Craig Orsinger
Дата:
Сообщение: Re: ODBC and VB5 I GIVE UP!!