[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>&nbsp;</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????&nbsp; ej.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2>CREATE TABLE=20
"novedades_modelos"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ("numero_interno" =
serial=20
NOT NULL,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "legajo" integer NOT=20
NULL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; check =
("legajo"=20
&gt;=3D 1),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "novedad" integer =
NOT=20
NULL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; check =
("novedad"=20
between 1 and 9999),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "planilla" =
char NOT=20
NULL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; check =
("planilla"=20
in=20
('1','2','3','4','5','6','7','8','9')),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;=20
"cantidad" int8 NOT NULL,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "base" =

int8<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; check =
("base" is=20
null or ("base" &gt;=3D 0 )),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
"factor"=20
float8 NOT =
NULL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; check=20
("factor" &lt;&gt; 0),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; primary =
key=20
("numero_interno"),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unique =
("legajo",=20
"novedad", "planilla")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ) =
;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2>/**&nbsp; OK&nbsp; --&nbsp; =
creado..&nbsp;&nbsp;=20
..ahora</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2>/*------ 28/05/03 08:39:09 AM=20
--------*/</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2>CREATE TABLE=20
"novedades_modelos_auditoria"<BR>&nbsp;("numero_interno" serial NOT=20
NULL,<BR>&nbsp;"legajo" int4 NOT NULL,<BR>&nbsp;"novedad" int4 NOT=20
NULL,<BR>&nbsp;"planilla" char NOT NULL,<BR>&nbsp;"cantidad" int8 NOT=20
NULL,<BR>&nbsp;"base" int8 ,<BR>&nbsp;"factor" float8 NOT=20
NULL,<BR>&nbsp;"fecha_insercion" timestamp default current_timestamp=20
,<BR>&nbsp;"usuario_insercion" varchar(60) default=20
current_user,<BR>&nbsp;primary key ("numero_interno")<BR>&nbsp;) =
;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2>/* Error : "ERROR:&nbsp; Relation=20
'novedades_mod_numero_intern_seq' already exists" */<BR></FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2>gracias..</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier=20
size=3D2>____________________________________________________<BR>Sandrigo=
 Lezcano=20
Jara&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;=20
Asunci=F3n, Paraguay<BR>usando______: Ret Hat 7.2 (Enigma) - Kernel =
2.4.7-10=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;=20
PostgreSQL 7.1.3 - psqlODBC 7.02.00.01<BR>migrando____: Sybase =
6.5&nbsp;&nbsp;=20
al&nbsp;&nbsp; PostgreSQL <BR>front end___: PowerBuilder=20
6.5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=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--