Viewing 15 posts - 3,421 through 3,435 (of 6,036 total)
Matt Miller (10/19/2007)
_____________
Code for TallyGenerator
October 19, 2007 at 6:54 am
Greg Snidow (10/19/2007)
Sergiy, wouldn't it be possible to have a small table of only hollidays, and if @DateEnd falls on one of those days just add 1?
Bloody site!
Wiped out...
_____________
Code for TallyGenerator
October 19, 2007 at 6:37 am
Funny story guys is that your UDF's don't work.
No matter how hard you try to perfect it.
They don't work by definition.
And nobody can do anything about it.
At least they don't...
_____________
Code for TallyGenerator
October 19, 2007 at 2:43 am
Sorin,
Your query returns columns only from table "s".
Why you need those joins at all?
_____________
Code for TallyGenerator
October 19, 2007 at 2:20 am
Jeff Moden (10/18/2007)
_____________
Code for TallyGenerator
October 18, 2007 at 10:02 pm
Another name for "View with parameters" is "Table function".
_____________
Code for TallyGenerator
October 18, 2007 at 7:48 pm
BTW, my Tally table holds 65k dates, it's the whole range of "smalldatetime" dates.
So, "Working Days" table contains 65k - 14 rows.
_____________
Code for TallyGenerator
October 18, 2007 at 7:28 pm
Jeff Moden (10/18/2007)
_____________
Code for TallyGenerator
October 18, 2007 at 7:18 pm
Jeff Gray (10/16/2007)
_____________
Code for TallyGenerator
October 18, 2007 at 4:21 pm
[font="Courier New"]--Create 2 tables to hold normalized data
IF Object_ID('dbo.PrefixCode', 'U') IS NOT NULL
DROP TABLE dbo.PrefixCode
CREATE TABLE dbo.PrefixCode (
ID smallint IDENTITY(-32767, 1) NOT NULL PRIMARY KEY NONCLUSTERED,
Code nvarchar(10) COLLATE SQL_Latin1_General_CP1_CI_AS...
_____________
Code for TallyGenerator
October 18, 2007 at 3:49 pm
Jim Howell (10/18/2007)
_____________
Code for TallyGenerator
October 18, 2007 at 2:55 pm
System functions are as bad here as UDFs.
But it does not mean you cannot use functions in WHERE clause at all.
You should not use it to modify values in table...
_____________
Code for TallyGenerator
October 18, 2007 at 1:58 pm
Lowell (10/18/2007)
i don't think you can use a calculated column in this case, because the penalty amount resides in a different table
You can declare computed column using a function.
And function...
_____________
Code for TallyGenerator
October 18, 2007 at 5:54 am
Kenneth Wilhelmsson (10/18/2007)No, there is no risk of memoryleaks or 'runaway' multiples of overwritten variables etc, since the declaration only happens once.
There is only risk of fooling yourself.
_____________
Code for TallyGenerator
October 18, 2007 at 5:45 am
Here is one trick which can help to understand it.
There is one variable which you can see declared.
It's table variable.
[font="Courier New"]----------------------------------
SELECT * FROM tempdb..sysobjects WHERE name LIKE '#%'
GO
SELECT * FROM...
_____________
Code for TallyGenerator
October 18, 2007 at 5:22 am
Viewing 15 posts - 3,421 through 3,435 (of 6,036 total)