enrique_aeo
asked on
DBCC CHECKIDENT ([certifica.ActividadesDiscentes], RESEED, 1)
i have this sp
alter procedure [certifica].[InsertarEnCer tifica]
@CodigoActividad numeric (38,0)
as
DBCC CHECKIDENT ([certifica.ActividadesDis centes], RESEED, 1)
INSERT INTO certifica.ActividadesDisce ntes (CodigoActividad, CodigoDiscente, Constancia)
SELECT distinct DC.CODCURSO, U.login, '1'
from
intranetamag.Usuario U, intranetamag.DiscentexCurs o DC ,
intranetamag.DiscentexCurs oxModulo DCM,intranetamag.EstadoDis cente ED
where
Dc.CODCURSO = @CodigoActividad
and DC.LOGIN=U.LOGIN and Dc.CODESTADODISCENTE=ED.CO DESTADODIS CENTE
and DC.LOGIN=DCM.LOGIN and DC.CODCURSO=DCM.CODCURSO
when
CREATE TABLE [certifica].[ActividadesDi scentes](
[CodigoActividadesDiscente s] [int] IDENTITY(1,1) NOT NULL,
every time you call this store the column [CodigoActividadesDiscente s] should begin in 1.
In the first call starts at 1, but the second call starts at 2, I want to always start in the value of a 1
alter procedure [certifica].[InsertarEnCer
@CodigoActividad numeric (38,0)
as
DBCC CHECKIDENT ([certifica.ActividadesDis
INSERT INTO certifica.ActividadesDisce
SELECT distinct DC.CODCURSO, U.login, '1'
from
intranetamag.Usuario U, intranetamag.DiscentexCurs
intranetamag.DiscentexCurs
where
Dc.CODCURSO = @CodigoActividad
and DC.LOGIN=U.LOGIN and Dc.CODESTADODISCENTE=ED.CO
and DC.LOGIN=DCM.LOGIN and DC.CODCURSO=DCM.CODCURSO
when
CREATE TABLE [certifica].[ActividadesDi
[CodigoActividadesDiscente
every time you call this store the column [CodigoActividadesDiscente
In the first call starts at 1, but the second call starts at 2, I want to always start in the value of a 1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.