Thx for your inputs.
The RDMBS is sql server 2008. the query is part of a stored procedure that uses dynamic sql to build up the query. It also uses temp-tables which lead to an error when i wanted to take a look at the execution plan.
It's just a bit strange because "normally" the query is...
Hello,
i wrote a client/server application. Atm i am in the test phase, so i am the only user of the system.
The problem is that one of my queries is sometimes really slow, or maybe it doesn't return (i inserted a timeout so i cann't say).
Now i want to analyze why that happens. So what can...
Hello,
i have a table with 25 fields that holds 8 million rows. For this table i use 13 indexes. Why? I set an index for every field that's used often for join or where operations.
But i read that using too many indexes is not recommendet. So i want to ask you experts: Can i use the indexes i...
Hello,
i have the following statement:
SELECT AVG(ROUND(Datediff(ss,start,end)/3600),2))
i want to have the following output:
1,27 hours
2,19 hours
1,03 hours
0,28 hours
5,93 hours
As start and end variables are time datatypes i have to cast it to a decimal to get the desired output, don't i...
@RiverGuy: As i am grouping by ID i have to choose an aggregate function for all the rows in the select-statement. Therefore i choose min(x) but the most values are the same for the grouped ids. (this means name = name for the grouped ids so i can take min() or max()).
So i have 2-3 "real"...
Hello guys, i have 3 questions concerning sql-select statements.
1)
Suppose i have a group by select statement, then i need for every column that is not used in group by an aggregate function:
select
id
min(date)
min(name)
...
FROM
table
GROUP BY id
Is there any way to avoid all this...
Thx Madawc.
So can my application start cr10 and transfer the data sets automatically to it so that cr10 can display it. This is meant when i wrote "diagrams of dataset" - The value of the datasets are displayed by cr10 (in this case as chart).
This shows how it works: (Just the Application...
I just had another idea:
SELECT
CASE
WHEN nr = 1 THEN nr
WHEN nr = 5 THEN nr
ELSE
(SELECT nr FROM table WHERE table.id = this.id + 1)
END
Would that be better than a self join?
Hello,
today i have the following question:
I need a SELECT statement that can also return the value of row n+1, which means:
SELECT
CASE nr = 1 THEN nr
CASE nr = 5 THEN nr
ELSE nextRow.nr
I guess this is not makeable with a select statement but seems to be a common problem (IF x THEN...
Hi,
i have a table A:
ID | VALUE
1 | 2
2 | 4
4 | 5
...
Now i want to create a select statement that adds the value of row n to row n+1 and that produce the following output:
ID | VALUE
1 | 2
2 | 6 (= 2 + 4)
3 | 11 (= 5 + 6)
...
I am sure there is an easy way to handle this.
Thx for any help.
Answer to Question 1: The data volume will not grow but it will change. Which means for a new month an old month has to go (For example: Data of Nov 2008 comes - Data of Nov 2005 goes). Otherwise i think the data would become too large for a fast queries.
Answer to Question 2: Just a few users...
As Paul helped me a lot to understand OLAP i think i finally got it now (with much reading too).
But i am at a deciding point where i have to know: is olap actually the right system to use here?
There is the following situation:
I have a table (~400.000 rows) (no data mart or data warehouse)...
Paul, let me say a big thx for your help here. You answered some questions i couldn't find in the books and helped me a LOT with your professional answers.
Also i have to apologize. I realized today that you answered my questions in a quoted text (post 2). I am used to the style that quoted...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.