|
|
Up |
|
|
  |
Author: MassimoMassimo
Date: Jan 26, 2007 11:03
I have a very very strange situation with a particular application and sql
server 2005 enterprise.
This application combines numerical data from multiple tables. User can make
query over this kind of tables, can build queries with "group by" "order by"
and "join", "sum, count(*) ecc. on many many columns.
I cannot know the query that application is going to build, so I do not know
how to create indexes.
I cant make indexes on all the columns of course, so I'm creating some index
over columns that should be statistically used in the join, but when there
is a group by on a column chosen from the user, I realize that the plan
become non efficient with the famigerate "TABLE SCAN".
Can somebody, give me an idea, to optimize this situation.
Thanx
Massimo
|
| |
|
| |
no comments
|
|
  |
Author: fireballfireball
Date: Jan 19, 2007 07:08
hi, I got confused for a moment about creating data structure for UML
composition (strong aggregation) relation one-to-many.
I used Rose/DataModeler to do so.
[Parent] -------- [Child]
I got P/FK (primary key of my component is foreign key of it's container) in
my child table:
Parent: PK Parent_ID
Child: P/FK Parent_ID
that way I found out I got relation 1:1, I'm still not sure how to create
data structure realizing compositiona one-to-many.
|
| |
|
| |
no comments
|
|
  |
Author: othellomyothellomy
Date: Jan 18, 2007 22:28
I was able to use reporting services but don't like it. It has less
reporting features and not easy to use. It got features that are not
needed. In fact more than 90%% of its features are not needed for
reporting purposes. They need to integrate some slim down version of
the product within the Enterprise Manager and hopefully it will get
better acceptability.
|
| |
|
no comments
|
|
  |
Author: othellomyothellomy
Date: Jan 18, 2007 22:19
I think this violates some of the basic principles of relational model
(not sure which ones). However I would love to see some sort of
solution to this problem though. There is some type of process to break
this into normal table with right groupings.
mouac01@ yahoo.com wrote:
> I want to sum up the amt field where the acct or group is A1000. Since
> A1110 belongs to group A1100, and A1100 belongs to group A1000 it
> should pick those amts up as well. The total should be 600. I have
> the sql below but I can't figure how to pick up acct A1110 since it
> should be rolling up to A1000 because of A1100.
>
> select sum(amt) from tbl_bal
> where acct='A1000' or group='A1000';
>
> tbl_bal
> acct group amt
> A1000 A1000 100
> A1100 A1000 200
> A1110 A1100 300
|
| |
|
no comments
|
|
  |
Author: jimjim
Date: Jan 18, 2007 20:51
I've been searching and trying out SQL statements for hours and I'm
still having a problem.
I'm querying 3 tables... and I only want the first unique record
returned.
Currently, the data returned looks like this..............
New York New York A
New York New York B
New York New York C
Los Angeles California A
Los Angeles California B
Los Angeles California C
I want the select statement to return this instead...
New York New York A
Los Angeles California A
I'm using MS SQL server.
please help?
thanks for your help.
|
| |
|
2 Comments |
|
  |
Author: jmoore1999jmoore1999
Date: Jan 18, 2007 09:15
I need to write a t-sql query that will take the value of the previous
record into consideration before calculating the current row's new
column value...
Here's the situation...
I have a query which return the following table structure...
Full_Name Points
----------------- ------------
Name1 855
Name2 805
Name3 800
Name4 775
Name5 775
Name6 741
etc.... etc...
|
| Show full article (1.07Kb) |
|
no comments
|
|
  |
|
|
  |
Author: SQL LearnerSQL Learner
Date: Jan 18, 2007 07:54
Hi All,
I need to link two tables using partial word match.
How can I write a SQL statement to do so? (I am using MS-Access.)
Table One: [Table Name: tblStreet] [Field Name: Street]
123 ABC Street
124 ABC Street
125 ABC Street
1 XYZ AVE
2 XYZ AVE
3 XYZ AVE
10 CBS Street
11 CBS Street
12 CBS Street
100 Apple Road
101 Apple Road
102 Apple Road
Table Two: [Table Name: tblWord] [Field Name: Word]
ABC
CBS
|
| Show full article (0.61Kb) |
|
1 Comment |
|
  |
Author: tolcistolcis
Date: Jan 18, 2007 07:52
Hi!
I am trying to execute a function to delete files older than 2 days.
I would like to be able to execute it using xp_cmdshell command. For
some reason it deletes all files. Does anybody know how to
differentiate files based on their date from within SQL?
Thank you,
T.
|
| |
|
no comments
|
|
  |
|
|
  |
Author: NateNate
Date: Jan 18, 2007 07:50
I am using a table, called 'dashboard', to track employee evaluations.
There are many columns in the table, some of which are populated with
one of four responses:
"Meets Expectations", "Below Expectations", "Not Observed", "Policy
Violation"
I would like to create a query that will search for any employee that
has two "Below Expectations" in the SAME column in a span of 30 days.
I was thinking of using CONTAINS, but that would require me specifying
EVERY one of the evaluation critera (live_1, live_2.. all the way to
live_8.. then review_1, review_2... review_11)
Any ideas?
|
| |
|
no comments
|
|
|
|
|
|
|