what is wrong with this SQL?
create table USERS (
ID decimal(19) CONSTRAINT primary_usr_oid PRIMARY KEY,
WRITE_COUNT decimal(19) NOT NULL,
CLASS decimal(10) NOT NULL,
STATUS decimal(3) NOT NULL,
USR_LOGIN_USER_ID varchar2(16) ,
USR_PASSWORD varchar2(16) ,
USR_PERSON_FIRST_NAME varchar(32) ,
USR_PERSON_MIDDLE_NAME varchar(32) ,
USR_PERSON_LAST_NAME varchar(32) ,
USR_PERSON_SALUTATION varchar(32) ,
USR_PERSON_SUFFIX varchar(32)
);
when i am in psql and i do: \i createUsersTable.sql i get this error:
psql:createUsersTable.sql:13: ERROR: parser: parse error at or near "("
What is this?
USR_LOGIN_USER_ID varchar2(16) ,
USR_PASSWORD varchar2(16) ,
There is not varchar2 type!
regards...
Alex K. <kornale@zdnetmail.com> wrote in message
news:99fb7937.0109201418.7ff032a2@posting.google.com...
Show quoted text
create table USERS (
ID decimal(19) CONSTRAINT primary_usr_oid PRIMARY KEY,
WRITE_COUNT decimal(19) NOT NULL,
CLASS decimal(10) NOT NULL,
STATUS decimal(3) NOT NULL,
USR_LOGIN_USER_ID varchar2(16) ,
USR_PASSWORD varchar2(16) ,
USR_PERSON_FIRST_NAME varchar(32) ,
USR_PERSON_MIDDLE_NAME varchar(32) ,
USR_PERSON_LAST_NAME varchar(32) ,
USR_PERSON_SALUTATION varchar(32) ,
USR_PERSON_SUFFIX varchar(32)
);when i am in psql and i do: \i createUsersTable.sql i get this error:
psql:createUsersTable.sql:13: ERROR: parser: parse error at or near "("What is this?
kornale@zdnetmail.com (Alex K.) writes:
create table USERS (
ID decimal(19) CONSTRAINT primary_usr_oid PRIMARY KEY,
WRITE_COUNT decimal(19) NOT NULL,
CLASS decimal(10) NOT NULL,
STATUS decimal(3) NOT NULL,
when i am in psql and i do: \i createUsersTable.sql i get this error:
psql:createUsersTable.sql:13: ERROR: parser: parse error at or near "("
PostgreSQL DECIMAL doesn't take a size argument. Take out the sizes
and you'll be good.
-Doug
--
In a world of steel-eyed death, and men who are fighting to be warm,
Come in, she said, I'll give you shelter from the storm. -Dylan
Import Notes
Reply to msg id not found: kornale@zdnetmail.com'smessageof20Sep2001151846-0700
kornale@zdnetmail.com (Alex K.) writes:
USR_LOGIN_USER_ID varchar2(16) ,
USR_PASSWORD varchar2(16) ,
when i am in psql and i do: \i createUsersTable.sql i get this error:
psql:createUsersTable.sql:13: ERROR: parser: parse error at or near "("
My previous mail was wrong, its the "varchar2" that's messing things
up--PG has no such type. The error message isn't too helpful.
Change it to "text" or regular "varchar" and you should be OK.
-Doug
--
In a world of steel-eyed death, and men who are fighting to be warm,
Come in, she said, I'll give you shelter from the storm. -Dylan
Import Notes
Reply to msg id not found: kornale@zdnetmail.com'smessageof20Sep2001151846-0700
On 20 Sep 2001, Alex K. wrote:
create table USERS (
ID decimal(19) CONSTRAINT primary_usr_oid PRIMARY KEY,
WRITE_COUNT decimal(19) NOT NULL,
CLASS decimal(10) NOT NULL,
STATUS decimal(3) NOT NULL,
USR_LOGIN_USER_ID varchar2(16) ,
USR_PASSWORD varchar2(16) ,
USR_PERSON_FIRST_NAME varchar(32) ,
USR_PERSON_MIDDLE_NAME varchar(32) ,
USR_PERSON_LAST_NAME varchar(32) ,
USR_PERSON_SALUTATION varchar(32) ,
USR_PERSON_SUFFIX varchar(32)
);when i am in psql and i do: \i createUsersTable.sql i get this error:
psql:createUsersTable.sql:13: ERROR: parser: parse error at or near "("What is this?
What is varchar2? It's probably complaining that it has a type that
isn't there followed by a () size spec and gets confused at that point.
Hi Alex,
You are using the non standard VARCHAR2 data type, only Oracle uses
this data type I wonder to know
the difference between VARCHAR and VARCHAR2, anyway try to change it to
VARCHAR.
I hope this help you.
Jose
Alex K. wrote:
Show quoted text
create table USERS (
ID decimal(19) CONSTRAINT primary_usr_oid PRIMARY KEY,
WRITE_COUNT decimal(19) NOT NULL,
CLASS decimal(10) NOT NULL,
STATUS decimal(3) NOT NULL,
USR_LOGIN_USER_ID varchar2(16) ,
USR_PASSWORD varchar2(16) ,
USR_PERSON_FIRST_NAME varchar(32) ,
USR_PERSON_MIDDLE_NAME varchar(32) ,
USR_PERSON_LAST_NAME varchar(32) ,
USR_PERSON_SALUTATION varchar(32) ,
USR_PERSON_SUFFIX varchar(32)
);when i am in psql and i do: \i createUsersTable.sql i get this error:
psql:createUsersTable.sql:13: ERROR: parser: parse error at or near "("What is this?
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
Is 'varchar2' a proper user-defined type?
Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"
Show quoted text
From: kornale@zdnetmail.com (Alex K.)
Organization: http://groups.google.com/
Date: 20 Sep 2001 15:18:46 -0700
To: pgsql-general@postgresql.org
Subject: [GENERAL] what is wrong with this SQL?create table USERS (
ID decimal(19) CONSTRAINT primary_usr_oid PRIMARY KEY,
WRITE_COUNT decimal(19) NOT NULL,
CLASS decimal(10) NOT NULL,
STATUS decimal(3) NOT NULL,
USR_LOGIN_USER_ID varchar2(16) ,
USR_PASSWORD varchar2(16) ,
USR_PERSON_FIRST_NAME varchar(32) ,
USR_PERSON_MIDDLE_NAME varchar(32) ,
USR_PERSON_LAST_NAME varchar(32) ,
USR_PERSON_SALUTATION varchar(32) ,
USR_PERSON_SUFFIX varchar(32)
);when i am in psql and i do: \i createUsersTable.sql i get this error:
psql:createUsersTable.sql:13: ERROR: parser: parse error at or near "("What is this?
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
...
PostgreSQL DECIMAL doesn't take a size argument. Take out the sizes
and you'll be good.
That doesn't seem to be a problem:
lockhart=# create table t1 (d decimal(19) not null);
CREATE
- Thomas
The difference between VARCHAR and VARCHAR2 in ORACLE is that VARCHAR2 is
ORACLE's UNICODE character data type - equiv to NCHAR in PostgreSQL.
Andy.
<zammon@libero.it> wrote in message news:3BB380F9.7000106@libero.it...
Show quoted text
Hi Alex,
You are using the non standard VARCHAR2 data type, only Oracle uses
this data type I wonder to know
the difference between VARCHAR and VARCHAR2, anyway try to change it to
VARCHAR.I hope this help you.
JoseAlex K. wrote:
create table USERS (
ID decimal(19) CONSTRAINT primary_usr_oid PRIMARY KEY,
WRITE_COUNT decimal(19) NOT NULL,
CLASS decimal(10) NOT NULL,
STATUS decimal(3) NOT NULL,
USR_LOGIN_USER_ID varchar2(16) ,
USR_PASSWORD varchar2(16) ,
USR_PERSON_FIRST_NAME varchar(32) ,
USR_PERSON_MIDDLE_NAME varchar(32) ,
USR_PERSON_LAST_NAME varchar(32) ,
USR_PERSON_SALUTATION varchar(32) ,
USR_PERSON_SUFFIX varchar(32)
);when i am in psql and i do: \i createUsersTable.sql i get this error:
psql:createUsersTable.sql:13: ERROR: parser: parse error at or near "("What is this?
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?