Added stored procedure getROImageByRODbID_FileName to find image files by name.
This commit is contained in:
parent
08bbb82714
commit
8d46574ec2
@ -10428,3 +10428,38 @@ GO
|
|||||||
IF (@@Error = 0) PRINT 'Procedure Creation: vesp_DeletePDFs Succeeded'
|
IF (@@Error = 0) PRINT 'Procedure Creation: vesp_DeletePDFs Succeeded'
|
||||||
ELSE PRINT 'Procedure Creation: vesp_DeletePDFs Error on Creation'
|
ELSE PRINT 'Procedure Creation: vesp_DeletePDFs Error on Creation'
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
/****** Object: StoredProcedure [getROImageByRODbID_FileName] ******/
|
||||||
|
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getROImagesByRODbID_FileName]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
|
||||||
|
DROP PROCEDURE [getROImagesByRODbID_FileName];
|
||||||
|
GO
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||||
|
Copyright 2012 - Volian Enterprises, Inc. All rights reserved.
|
||||||
|
*****************************************************************************/
|
||||||
|
CREATE PROCEDURE [dbo].[getROImagesByRODbID_FileName]
|
||||||
|
(
|
||||||
|
@RODbID int,
|
||||||
|
@FileName nvarchar(255)
|
||||||
|
)
|
||||||
|
WITH EXECUTE AS OWNER
|
||||||
|
AS
|
||||||
|
SELECT
|
||||||
|
[ImageID],
|
||||||
|
[RODbID],
|
||||||
|
[FileName],
|
||||||
|
[Content],
|
||||||
|
[Config],
|
||||||
|
[DTS],
|
||||||
|
[UserID],
|
||||||
|
[LastChanged],
|
||||||
|
(SELECT COUNT(*) FROM [Figures] WHERE [Figures].[ImageID]=[ROImages].[ImageID]) [FigureCount]
|
||||||
|
FROM [ROImages]
|
||||||
|
WHERE [RODbID]=@RODbID AND [FileName]=@FileName Order By [DTS]
|
||||||
|
RETURN
|
||||||
|
GO
|
||||||
|
-- Display the status of Proc creation
|
||||||
|
IF (@@Error = 0) PRINT 'Procedure Creation: getROImagesByRODbID_FileName Succeeded'
|
||||||
|
ELSE PRINT 'Procedure Creation: getROImagesByRODbID_FileName Error on Creation'
|
||||||
|
GO
|
||||||
|
Loading…
x
Reference in New Issue
Block a user