Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _Bandera=0
- llError = SQLEXEC(lnHandle , "CALL `List_Edificios`('C0001', '1', ?_Bandera)"
- llError = SQLEXEC(lnHandle , "SELECT @_Bandera;","crsSalida")
- SELECT crsSalida
- BROWSE
- CREATE DEFINER=`root`@`localhost` PROCEDURE `List_Edificios`(
- IN `_XCod_edi` int(11) ,
- IN `_modo` Varchar(1),
- OUT `_Bandera` int(11)
- )
- LANGUAGE SQL
- NOT DETERMINISTIC
- CONTAINS SQL
- SQL SECURITY DEFINER
- COMMENT ''
- Begin
- If _modo = '1' Then
- if EXISTS ( SELECT Cod_edi From Edificios Where ( Cod_edi = _XCod_edi ) ) then
- Select Cod_edi, Nom_edi, Siglas_edi, Estatus_edi From Edificios Where ( Cod_edi = _XCod_edi ) Limit 1;
- Set _Bandera = 0;
- Else
- Set _Bandera = -1;
- End if;
- End if;
- If _modo = '2' Then
- Select Cod_edi, Nom_edi, Siglas_edi, Estatus_edi From Edificios order by Cod_edi ;
- Set _Bandera = 0;
- End if;
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement