>-- =============================================
>-- Author: xxxxx
>-- Create date: 11-01-2012
>-- Description: Selecciona los datos de operacion a calcular
>-- =============================================
>ALTER PROCEDURE [dbo].[Sel_Trae_Folio_ICS]
>
>AS
>BEGIN
> Select Folio_TB_ics from PRM_Folios
> UPDATE dbo.PRM_Folios
> SET Folio_TB_ICS = Folio_TB_ics + 1
>END
>
>
>
>Any ideas on how to make this code better or what we are doing wrong?
>
>Thanks,
>Daniel
I re-read the question. Are you implementing your own sequence table? Does that table have just a single row?
Take a look at this thread
http://forum.lessthandot.com/viewtopic.php?f=17&t=6518
If it's not broken, fix it until it is.
My Blog