Viewing 15 posts - 6,796 through 6,810 (of 7,608 total)
Michael Valentine Jones (2/12/2013)
ScottPletcher (2/12/2013)
Michael Valentine Jones (2/12/2013)
ScottPletcher (2/12/2013)
Michael Valentine Jones (2/11/2013)
ScottPletcher (2/11/2013)
Michael Valentine Jones (2/11/2013)
ScottPletcher (2/11/2013)
ScottPletcher (2/11/2013)
...
I haven't been in any business that worked with dates before 1900, but...
February 12, 2013 at 2:32 pm
Michael Valentine Jones (2/12/2013)
ScottPletcher (2/12/2013)
Michael Valentine Jones (2/11/2013)
ScottPletcher (2/11/2013)
Michael Valentine Jones (2/11/2013)
ScottPletcher (2/11/2013)
ScottPletcher (2/11/2013)
...
I haven't been in any business that worked with dates before 1900, but if yours did, then...
February 12, 2013 at 1:01 pm
The first format is definitely preferable, although I prefer checking the variable first to give SQL as much chance as possible to short-circuit (bypass) the second comparison:
WHERE (@seq IS NULL...
February 12, 2013 at 10:21 am
nsmith 8448 (2/12/2013)
One of the requirements is to create primary and foreign keys in the tables.
Is it acceptable to add the Emp_Id column to each table and use that as...
February 12, 2013 at 10:16 am
akshay.pawar123 (2/11/2013)
GilaMonster (1/9/2013)
ScottPletcher (1/9/2013)
If SQL needs only key column(s), why does it read all the leaf pages of the table as well?? That's an incredible waste of I/O.
The...
February 12, 2013 at 8:07 am
Michael Valentine Jones (2/11/2013)
ScottPletcher (2/11/2013)
Michael Valentine Jones (2/11/2013)
ScottPletcher (2/11/2013)
ScottPletcher (2/11/2013)
...
I haven't been in any business that worked with dates before 1900, but if yours did, then that would be a...
February 12, 2013 at 8:01 am
Michael Valentine Jones (2/11/2013)
ScottPletcher (2/11/2013)
ScottPletcher (2/11/2013)
...
I haven't been in any business that worked with dates before 1900, but if yours did, then that would be a relevant concern for you....
February 11, 2013 at 4:09 pm
Sean Lange (2/11/2013)
DON'T use things you don't need, like the BEGIN and END for the proc itself - completely unneeded and doing nothing but cluttering up the screen.
Actually begin...
February 11, 2013 at 4:05 pm
For best performance,
Cluster the table by
LAST_DAY_OF_MONTH
and not the dopey identity column. If you still need the identity (??), you can leave it as the nonclustered pk.
February 11, 2013 at 1:12 pm
You would need to code the time constraints in your WHERE clause. That is, bypass those rows yourself rather than trying to have SQL do it itself.
You might not...
February 11, 2013 at 1:08 pm
am wondering if the CASE requires all arguments to run against the exact same column?
No. CASE is very flexible: you can compare any columns you need to, in any...
February 11, 2013 at 10:03 am
ScottPletcher (2/11/2013)
Michael Valentine Jones (2/11/2013)
ScottPletcher (2/11/2013)
DECLARE @startDate datetime
DECLARE @number_of_months int
SET @startDate = GETDATE()
SET @number_of_months = 7
SELECT
DATEADD(DAY,...
February 11, 2013 at 9:49 am
Marius.D (2/11/2013)
or maybe you specified DESC on one of the existing index keys?!
I did not, but would that make a difference? I didn't think the missing indexes...
February 11, 2013 at 9:44 am
Method below works for any and all date and language settings:
DECLARE @startDate datetime
DECLARE @number_of_months int
SET @startDate = GETDATE()
SET @number_of_months = 7
SELECT
DATEADD(DAY, DATEDIFF(DAY, '19000107', last_day_of_month) / 7...
February 11, 2013 at 8:50 am
Viewing 15 posts - 6,796 through 6,810 (of 7,608 total)