You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
3.4 KiB
63 lines
3.4 KiB
USE [Vertragsverwaltung_20160404]
|
|
GO
|
|
/****** Object: StoredProcedure [dbo].[sp_lc_get_produkte] Script Date: 02.12.2016 09:08:53 ******/
|
|
DROP PROCEDURE [dbo].[sp_lc_get_produkte]
|
|
GO
|
|
/****** Object: StoredProcedure [dbo].[sp_lc_get_produkte] Script Date: 02.12.2016 09:08:55 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
|
|
|
|
-- =============================================
|
|
-- Author: <Author,,Name>
|
|
-- Create date: <Create Date,,>
|
|
-- Description: <Description,,>
|
|
-- =============================================
|
|
CREATE PROCEDURE [dbo].[sp_lc_get_produkte]
|
|
AS
|
|
BEGIN
|
|
DECLARE @tmp1 TABLE
|
|
(
|
|
id INT ,
|
|
parentid INT ,
|
|
bezeichnung VARCHAR(255) ,
|
|
imageindex INT ,
|
|
beschreibung VARCHAR(1024) ,
|
|
IstStruktur BIT ,
|
|
verweisnr INT ,
|
|
copy INT ,
|
|
originalid INT,
|
|
Produkttypnr int,
|
|
Eingesetzt int
|
|
)
|
|
|
|
SET NOCOUNT ON;
|
|
|
|
|
|
INSERT @tmp1
|
|
SELECT lc_produktnr AS id ,
|
|
lc_produktnr_parent AS parentid ,
|
|
bezeichnung ,
|
|
imageindex AS imageindex ,
|
|
ISNULL(Beschreibung, '') AS Beschreibung ,
|
|
IstStruktur ,
|
|
ISNULL(verweisnr, 0) AS Verweisnr ,
|
|
0 AS copy ,
|
|
LC_ProduktNr,
|
|
ProdukttypNr, StatusNr
|
|
FROM dbo.LC_Produkt
|
|
WHERE aktiv = 1 AND IstStruktur=0
|
|
|
|
|
|
|
|
END
|
|
|
|
SELECT *
|
|
FROM @tmp1
|
|
ORDER BY bezeichnung
|
|
|
|
|
|
GO
|