Viewing 15 posts - 166 through 180 (of 508 total)
I would set up a calendar table for this type of thing. That way you always get exactly what you want. Here are some links showing how to...
June 28, 2011 at 12:10 pm
opc.three (6/25/2011)
tfifield (6/24/2011)
June 26, 2011 at 2:17 pm
Just to add my 2 cents to what Sean posted. You should think of column names as objects in the database. The Employee table shouldn't have a column...
June 24, 2011 at 12:58 pm
Craig Farrell (6/24/2011)
BCLynch (6/24/2011)
June 24, 2011 at 12:49 pm
Craig Farrell (6/23/2011)
The following was tested in a 2k8 R1 environment off my local drives. End result, and if you read the...
June 24, 2011 at 12:21 pm
TheSQLGuru (6/23/2011)
tfifield (6/23/2011)
June 24, 2011 at 12:13 pm
opc.three,
On your question to Kevin.
I've bench marked CREATE TABLE/INSERT INTO vs SELECT INTO many times. What I come up with is that the SELECT INTO is always faster -...
June 23, 2011 at 1:14 pm
ankit.shukla1105 (6/23/2011)
WITH CTE (QuestionID)
AS
(select distinct sf.questionID
...
June 23, 2011 at 12:38 pm
There's another option to this. If the table is large and you have to scan it anyway, it might be more optimum to just make one pass at it...
June 23, 2011 at 12:28 pm
TheSQLGuru (6/23/2011)
sqldba_icon (6/22/2011)
I really appreciate and thank all of you for taking some time to reply to my post. I think i will try creating a temp table first,...
June 23, 2011 at 11:09 am
I've seen this sort of thing fairly often. A query that does a lot of searching being done in one fell swoop takes minutes. Breaking it out into...
June 22, 2011 at 1:55 pm
Gus,
I just put that one in my tool box.
Todd Fifield
June 22, 2011 at 1:38 pm
As always, Gus has imparted a wealth of information. I get the trained habits. I guess I trained myself on how to eyeball code and it works for...
June 22, 2011 at 1:23 pm
bphipps-931675 (6/21/2011)
SELECT
SO.SalesPersonID, C.FirstName + ' ' + C.LastName AS SalesPerson
,...
June 21, 2011 at 4:32 pm
bphipps-931675 (6/21/2011)
Celko
Some version of this mis-use of SQL gets invented again every few months. It is a slow, dangerous mess. Are you familar with the long parameters list idiom? SQL...
June 21, 2011 at 4:22 pm
Viewing 15 posts - 166 through 180 (of 508 total)