Viewing 15 posts - 4,471 through 4,485 (of 6,036 total)
Harley, did you try the approach I suggested on my first posting on page 2?
This additional table will contain as many different date columns as you need in one.
This...
_____________
Code for TallyGenerator
March 28, 2007 at 5:49 pm
Users? Which users?
You not suppose to know where they live!
It should be "(#&($^$%!!!!-ing stupid developers!!!"
_____________
Code for TallyGenerator
March 28, 2007 at 7:06 am
Kenneth,
actually CLR is text processing, it's not about database at all.
No wonder SQL is not optimal for tasks it was not designed for.
I would suggest not to use T-SQL also...
_____________
Code for TallyGenerator
March 28, 2007 at 6:45 am
Yes, Andy,
you are right about dynamic SQL.
But it does not mean dynamic SQL must be built outside SP.
SQL injections, security issues (e.g. not every DBA is happy to let...
_____________
Code for TallyGenerator
March 27, 2007 at 7:57 pm
Harley, do simple exercise:
CREATE TABLE dbo.SalesChanges (
SalesID int,
ActionID tinyint, -- Say, 1 = CREATE, 2 = Insert, 3 = Close, etc.
ActionDate
)
CREATE CLUSTERED INDEX CX_ActionDate ON dbo.SalesChanges(ActionDate)
CREATE INDEX IX_SalesID ON dbo.SalesChanges(SalesID)
CREATE...
_____________
Code for TallyGenerator
March 27, 2007 at 6:01 pm
| I think Antares is probably on the right trail...
|
Hmm...
Is it easier to embed generic SQL into application...
_____________
Code for TallyGenerator
March 27, 2007 at 4:36 pm
Did you actually try this approach?
I mean including right indexing.
How many ID's you need to include in report to make it over 1s to run?
What makes you think that this...
_____________
Code for TallyGenerator
March 27, 2007 at 6:02 am
The best you can do here is to set up clustered index on (Col1, Col2)
And don't load the whole table. If you will select limited number of ID's to present...
_____________
Code for TallyGenerator
March 27, 2007 at 5:37 am
Bad for you.
Do you have at least one query selecting sequential SalesID's?
WHERE SalesID between ### and ###
?
If not then there is no use for that clustered index in your...
_____________
Code for TallyGenerator
March 26, 2007 at 6:03 pm
Then you need just make the index on this column clustered.
_____________
Code for TallyGenerator
March 26, 2007 at 5:23 pm
Try to avoid querying system tables, especially from outside of database.
You need to have quite relaxed security model to perform it, and one day one pissed off employee could make...
_____________
Code for TallyGenerator
March 26, 2007 at 5:17 pm
What's datatype for TRD.SalesDate?
_____________
Code for TallyGenerator
March 26, 2007 at 4:20 pm
Bad design always leads to ugly queries and maintenance problems.
_____________
Code for TallyGenerator
March 22, 2007 at 5:10 pm
NULLIF works faster than CASE and makes your code more clean.
_____________
Code for TallyGenerator
March 22, 2007 at 5:04 pm
Viewing 15 posts - 4,471 through 4,485 (of 6,036 total)