1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
/****** Objet : Procédure stockée dbo.spS_Etablissements Date du script : 30/08/2007 15:22:47 ******/
/****** Objet : Procédure stockée dbo.spS_Etablissements Date du script : 23/08/2007 15:28:06 ******/
ALTER Procedure [dbo].[spS_Etablissements]
-- Retrieve specific records from the [Etablissements] table depending on the input parameters you supply.
(
@id [int] = Null -- for [Etablissements].[id] column
,@ReturnXML [bit] = 0 -- Indicates if we want to get back XML content instead of normal resultset (@ReturnXML = 1 to get XML back)
)
-- Returns the number of records found
As
/*
This T-SQL code was automatically generated using:
SQL Server Centric .NET Code Generator
v 1.0.1287.20792
Generation Date: 22/08/2007 15:37:09
Generator name: <Developer Name Here>
Template last update: 24/06/2002 01:53:57
Template revision: 15083637
SQL Server version: 08.00.0760
Server: vscaissesfor
Database: [MFL_GDC_VA]
WARNING: This source is provided "AS IS" without warranty of any kind.
The author disclaims all warranties, either express or implied, including
the warranties of merchantability and fitness for a particular purpose.
In no event shall the author or its suppliers be liable for any damages
whatsoever including direct, indirect, incidental, consequential, loss of
business profits or special damages, even if the author or its suppliers
have been advised of the possibility of such damages.
*/
-- IMPORTANT:
-- Changes to this SQL code may cause incorrect behavior
-- and will be lost if the code is regenerated.
If @ReturnXML Is Null
Set @ReturnXML = 0
If @ReturnXML = 0
Begin
Select
[Etablissements_Records].[id]
,[Etablissements_Records].[id_directeur]
,[Etablissements_Records].[nom]
,[Etablissements_Records].[ecart_max]
,[Etablissements_Records].[date_prem_saisie]
,[Etablissements_Records].[garder_caisse_courante]
From [fnEtablissements](@id) As [Etablissements_Records]
End
Else
Begin
Select
[Etablissements_Records].[id]
,[Etablissements_Records].[id_directeur]
,[Etablissements_Records].[nom]
,[Etablissements_Records].[ecart_max]
,[Etablissements_Records].[date_prem_saisie]
,[Etablissements_Records].[garder_caisse_courante]
From [fnEtablissements](@id) As [Etablissements_Records]
For XML Auto, Elements, XMLData, BINARY BASE64
End
Return(@@RowCount) |
Partager