Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IF @ROL = 'PVR'
- BEGIN
- SELECT @num_cli = PVR_NUM_CLI,
- @nro_id = pvr_rut,
- @SEGMENTO = pvr_segm,
- @TIP_PROD = pvr_tip_prod,
- @TIP_IDE = pvr_tip_ide
- FROM PVR
- WHERE pvr_id_pvr = @ID_CLI
- END;
- ELSE
- SELECT @num_cli = gpg_NUM_CLI,
- @nro_id = gpg_rut,
- @SEGMENTO = gpg_segm,
- @TIP_PROD = gpg_tip_prod,
- @TIP_IDE = gpg_tip_ide
- FROM gpg
- WHERE gpg_id_gpg = @ID_CLI
- SELECT @COD_PROD = ID FROM BF_TASAS..PRODUCTO WHERE moneda = @MONEDA AND segmento = @SEGMENTO AND @TIP_PROD =
- (CASE tip_prod_ibs
- WHEN 1 THEN 2
- WHEN 2 THEN 1
- END
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement