Viewing 6 posts - 46 through 51 (of 51 total)
hey,
i think the answer is:
CREATE FUNCTION dbo.fn_day_of_quarter(@dayInQuarter AS DATETIME) RETURNS INTEGER
AS
BEGIN
DECLARE @month AS INTEGER
SET @month = DATEPART(m, @dayInQuarter)
DECLARE @firstDayInQuarter AS DATETIME
...
July 15, 2004 at 4:24 pm
hey francisco,
my suggestions would be the following:
(1) Try getting rid of the INSERT statements inside the proc
(2) If suggestion 1 is not feasible, then the other option is to try...
July 15, 2004 at 3:39 pm
if you are referring about the return value of a user-defined function or the value of an output parameter of a stored procedure, then the answer is yes ...
July 14, 2004 at 2:43 pm
assumming both columns are some type of integer, trying doing a bitwise AND on both columns in your SELECT DISTINCT clause as follows:
SELECT DISTINCT(ti.tactical_issue_id & ti2.tactical_issue_id), ti.tactical_issue_id as ti1,...
July 13, 2004 at 5:39 pm
hey, this should work:
SQL for one parameter:
SELECT ServerName, Environment, ServerRole FROM V_ServerDetail
WHERE ServerName = @ServerName OR @ServerName IS NULL
ORDER BY ServerName
SQL for two parameter(s):
SELECT...
July 13, 2004 at 4:53 pm
hey francis,
you would need to do something like the example below:
-- [BEGIN] : Code Snippet
DECLARE @SQLText AS NVARCHAR(500)
SET @SQLText = N'SELECT @Itemout=some_field FROM Some_Table WHERE some_other_field...
July 13, 2004 at 4:34 pm
Viewing 6 posts - 46 through 51 (of 51 total)