home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
moodle.waes.ac.uk
/
moodle.waes.ac.uk.zip
/
moodle.waes.ac.uk
/
TMG
/
SP1-TMG-KB981324-AMD64-ENU.msp
/
PCW_CAB_SHFx2
/
F2143_msfpcui.dll
/
BINARY
/
25410
< prev
next >
Wrap
Text File
|
2010-06-15
|
694b
|
27 lines
CREATE FUNCTION [dbo].[fnGetSummaryTableName]
(
@tblBaseName varchar(50),
@FromDate datetime,
@ToDate datetime,
@ReportType varchar(10)
)
RETURNS varchar(250)
AS
BEGIN
DECLARE @PostFix varchar(120)
IF (@ReportType = 'Immediate')
SET @PostFix = '_' + CONVERT(varchar, @FromDate, 126) + '_' + CONVERT(varchar, @ToDate, 126)
ELSE IF (@ReportType = 'Daily')
SET @PostFix = ''
ELSE IF (@ReportType = 'Monthly')
SET @PostFix = ''
ELSE
BEGIN
SET @PostFix = 'UNKNOWNTYPE'
SET @ReportType = '_ERROR'
END
RETURN '[' + @tblBaseName + '_' + @ReportType + @PostFix + ']'
END