Many Thanks!!! It works!
Regards,
Josef
2011/10/10 Ondrej Ivanič :
> Hi,
>
> On 10 October 2011 21:35, József Kurucz wrote:
>> ERROR: syntax error at or near "$1"
>> LINE 1: create table $1 ( )
>> ^
>> QUERY: create table $1 ( )
>> CONTEXT: SQL statement in PL/PgSQL
On Monday, October 10, 2011 3:35:27 am József Kurucz wrote:
> Hi,
>
> I'm beginner in postgresql and plpgsql and i have the following problem.
> I'm trying to check a table if exists or not and when not exists then
> create it, but I get a syntax error.
>
> Here is my code:
>
>
> create or repl
Hi,
On 10 October 2011 21:35, József Kurucz wrote:
> ERROR: syntax error at or near "$1"
> LINE 1: create table $1 ( )
> ^
> QUERY: create table $1 ( )
> CONTEXT: SQL statement in PL/PgSQL function "check_table" near line 22
I think you have to use "execute":
execute
Hi,
I'm beginner in postgresql and plpgsql and i have the following problem.
I'm trying to check a table if exists or not and when not exists then
create it, but I get a syntax error.
Here is my code:
create or replace function check_table() returns void as
$$
DECLARE
mmonth integer;
yyear in