![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#3
|
|||
|
|||
|
Sigo Teniendo Problemas Con La Inserccion:
Este Es La Funcion: Create Function Fue_vigente_2( @id_trabajad Int, @fi Datetime, @ff Datetime) Returns Varchar(2) As Begin Declare @movimiento Varchar(1) Declare @fecha_mov Datetime Declare @fue Varchar(2) Set @movimiento='z' Select @movimiento=mov_tipo, @fecha_mov=fecha From V_trabmovi Where Id_trabajad=@id_trabajad And Fecha<=@ff And Id_trabmovi=(select Max(id_trabmovi) From Trabmovi Where Id_trabajad=@id_trabajad) If (@movimiento<>'z') Begin If (@movimiento='b' And @fecha_mov>=@fi) Set @fue='si' Else If (@movimiento='b' And (@fecha_mov<@ff Or @fecha_mov<@fi)) Set @fue='no' Else Set @fue='si' End Else Set @fue='no' Return @fue End Y Trate De Poner La Insercion Como Me Dijiste Insert Into Trabvig(id_trabajad, Vigente) Select (id_trabajad, Fue_vigente_2 (id_trabajad, '10/01/206','10/31/2006') From Trabajad Estoy Haciendo Algo Mal?? Saludos |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| Procedimiento Almacenado Devolver una Select | granchop | Firebird e Interbase | 5 | 14-09-2006 09:57:03 |
| procedimiento dentro de procedimiento | chechu | Varios | 6 | 24-11-2005 23:34:48 |
| SP dentro de Select | buitrago_listas | Firebird e Interbase | 1 | 17-01-2005 13:43:04 |
| for select....do en procedimiento almacenado | lledesma | SQL | 1 | 23-04-2004 08:03:01 |
| Select a procedimiento almacenado | ACK | Firebird e Interbase | 12 | 19-07-2003 20:13:28 |
|