A personal repository of random information in compensation for a fatigued biological computer
Breaded IT » MS Access / SQL Server reminders » SQL Server 2000: DBName
DECLARE
@startdate as smalldatetime,
@enddate as smalldatetime,
@xxxxsourcequery as nvarchar(100),
@xxxxquery as nvarchar(1500)
SET @startdate = (SELECT StartDate FROM crystalcommon.dbo.FinancialYears WHERE DisplayText = @FY)
SET @enddate = (SELECT EndDate FROM crystalcommon.dbo.FinancialYears WHERE DisplayText = @FY)
SET @archwaysourcequery =
(CASE WHEN (select db_name()) = 'Collection_Valuations'
Then 'crystalcommon.dbo.AllAccessionsFromxxxx()'
ELSE 'crystalcommon.dbo.AllAccessionsFromxxxx()'
END)