[Pgsql-ayuda] RV: *_seq "repetida"
sandrigo lezcano
psql@msa.com.py
Wed, 28 May 2003 10:38:54 -0500
This is a multi-part message in MIME format.
------=_NextPart_000_00DC_01C32505.5636C500
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
si tengo mas de una tabla con autoincrement en el mismo campo como =
deferencio uno del otro???? ej.
CREATE TABLE "novedades_modelos"
("numero_interno" serial NOT NULL,
"legajo" integer NOT NULL
check ("legajo" >=3D 1),
"novedad" integer NOT NULL
check ("novedad" between 1 and 9999),
"planilla" char NOT NULL
check ("planilla" in ('1','2','3','4','5','6','7','8','9')),
"cantidad" int8 NOT NULL,
"base" int8
check ("base" is null or ("base" >=3D 0 )),
"factor" float8 NOT NULL
check ("factor" <> 0),
primary key ("numero_interno"),
unique ("legajo", "novedad", "planilla")
) ;
/** OK -- creado.. ..ahora
/*------ 28/05/03 08:39:09 AM --------*/
CREATE TABLE "novedades_modelos_auditoria"
("numero_interno" serial NOT NULL,
"legajo" int4 NOT NULL,
"novedad" int4 NOT NULL,
"planilla" char NOT NULL,
"cantidad" int8 NOT NULL,
"base" int8 ,
"factor" float8 NOT NULL,
"fecha_insercion" timestamp default current_timestamp ,
"usuario_insercion" varchar(60) default current_user,
primary key ("numero_interno")
) ;
/* Error : "ERROR: Relation 'novedades_mod_numero_intern_seq' already =
exists" */
=20
puedo indicarle de ulguna otra manera de qe se trata de un campo en otro =
archivo?????
gracias..
____________________________________________________
Sandrigo Lezcano Jara Asunci=F3n, Paraguay
usando______: Ret Hat 7.2 (Enigma) - Kernel 2.4.7-10=20
PostgreSQL 7.1.3 - psqlODBC 7.02.00.01
migrando____: Sybase 6.5 al PostgreSQL=20
front end___: PowerBuilder 6.5 =20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3DICQ:143590717=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
____________________________________________________
------=_NextPart_000_00DC_01C32505.5636C500
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV> </DIV>
<DIV><FONT face=3DCourier size=3D2>si tengo mas de una tabla con =
autoincrement en el=20
mismo campo como deferencio uno del otro???? ej.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DCourier size=3D2>CREATE TABLE=20
"novedades_modelos"<BR> ("numero_interno" =
serial=20
NOT NULL,<BR> "legajo" integer NOT=20
NULL<BR> check =
("legajo"=20
>=3D 1),<BR> "novedad" integer =
NOT=20
NULL<BR> check =
("novedad"=20
between 1 and 9999),<BR> "planilla" =
char NOT=20
NULL<BR> check =
("planilla"=20
in=20
('1','2','3','4','5','6','7','8','9')),<BR> =
=20
"cantidad" int8 NOT NULL,<BR> "base" =
int8<BR> check =
("base" is=20
null or ("base" >=3D 0 )),<BR> =
"factor"=20
float8 NOT =
NULL<BR> check=20
("factor" <> 0),<BR> primary =
key=20
("numero_interno"),<BR> unique =
("legajo",=20
"novedad", "planilla")<BR> ) =
;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DCourier size=3D2>/** OK -- =
creado.. =20
..ahora</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DCourier size=3D2>/*------ 28/05/03 08:39:09 AM=20
--------*/</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DCourier size=3D2>CREATE TABLE=20
"novedades_modelos_auditoria"<BR> ("numero_interno" serial NOT=20
NULL,<BR> "legajo" int4 NOT NULL,<BR> "novedad" int4 NOT=20
NULL,<BR> "planilla" char NOT NULL,<BR> "cantidad" int8 NOT=20
NULL,<BR> "base" int8 ,<BR> "factor" float8 NOT=20
NULL,<BR> "fecha_insercion" timestamp default current_timestamp=20
,<BR> "usuario_insercion" varchar(60) default=20
current_user,<BR> primary key ("numero_interno")<BR> ) =
;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DCourier size=3D2>/* Error : "ERROR: Relation=20
'novedades_mod_numero_intern_seq' already exists" */<BR></FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT> </DIV>
<DIV><FONT face=3DCourier size=3D2>puedo indicarle de ulguna otra manera =
de qe se=20
trata de un campo en otro archivo?????</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DCourier size=3D2>gracias..</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DCourier=20
size=3D2>____________________________________________________<BR>Sandrigo=
Lezcano=20
Jara &nb=
sp;=20
Asunci=F3n, Paraguay<BR>usando______: Ret Hat 7.2 (Enigma) - Kernel =
2.4.7-10=20
<BR> &nb=
sp; =20
PostgreSQL 7.1.3 - psqlODBC 7.02.00.01<BR>migrando____: Sybase =
6.5 =20
al PostgreSQL <BR>front end___: PowerBuilder=20
6.5 =20
<BR>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3DICQ:143590717=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR>_________=
___________________________________________</FONT></DIV></BODY></HTML>
------=_NextPart_000_00DC_01C32505.5636C500--