Viewing 15 posts - 571 through 585 (of 622 total)
Ahh the old indexes on OLTP databases issue...
Indexes add overhead to the inserting, modifiying and deleting of records. If you have a high volume OLTP (On-line Transactional Processing) database...
April 4, 2012 at 4:40 am
Grant Fritchey (4/3/2012)
And the JOIN criteria
DRP.rank = DRD.rank + 1
I suspect that's going to lead to scans too.
Why? - not saying it won't but what makes you think that it...
April 3, 2012 at 1:06 pm
Sean,
Thanks for that. I can rewrite it as
AND NOT (
D.SubBalA = coalesce(P.SubBalA,0) AND
D.SubBalB = coalesce(P.SubBalB,0) AND
)
Which sort of gets rid of the inequality by reversing the logic, but...
April 3, 2012 at 1:02 pm
some thoughts,
1) could you calculate the extremis lat/long @ 2,5,10,20 miles for each of the compass points (up to you whether you use [4 point: NSEW], [8 points: N,NE,E,SE,S,SW,S,NW] or...
April 3, 2012 at 9:36 am
yes, that is probably a better syntax (personally I think it is a little harder to read) but it will work for multi-part primary keys whereas the IN (SELECT...) won't
April 2, 2012 at 1:13 pm
PIVOT requires that you specify the column values to be displayed as part of the command.
All of the PIVOT solutions posted assume that there is a maximum of 3 phone...
April 2, 2012 at 5:39 am
What are you going to do with those strings once you have created them? It should really be a process for your presentation layer to loop through the results...
April 2, 2012 at 5:15 am
A couple of points....
What sort of average:
Mean: Sum of results / number of results
Median: the middle of the results set when ordered by vale (mean of number either side...
April 2, 2012 at 5:07 am
My preference for this would be the use of CTEs (Common Table Expressions); I find this the easiest way to visualise a problem because you can break it into discreet...
April 2, 2012 at 4:52 am
If you choose two tables, it will automatically join it based on the first matching column name.
so will most report generators including Crystal reports and Access. This normally means...
March 22, 2012 at 5:27 pm
I'm not thinking of using optimiser hints, just trying to make sure that all bases are covered for future thread viewers!
March 22, 2012 at 5:20 pm
I don't know showcase, but Crystal reports is quite good for drag and drop queries.
If you are a Microsoft house (Sequel Server and/or Sharepoint) then it is worth learning SSRS...
March 22, 2012 at 9:09 am
Great idea!
One other issue would be that the index names would not correlate to the table. SQL doesn't care but a hint optimiser might 😛
your point about the DDL...
March 22, 2012 at 8:46 am
Riccado, Can you post a summary of your solution so that we can add to the knowlege base.
Aaron
March 21, 2012 at 9:40 am
RANK() OVER(Partition by CustomerNo order by CustomerNo ASC, Date ASC) as 'RANK'
Depending on what exactly you are trying to do and the data structure, you may also want to look...
March 21, 2012 at 7:30 am
Viewing 15 posts - 571 through 585 (of 622 total)