Viewing 15 posts - 5,371 through 5,385 (of 5,502 total)
Hi Tom,
when I look at your first solution, you're using
Select ... FROM TestTable
WHERE TimePeriod >= ...
AND Area = ....
In Wayne's solution he's using:
Select ... from #TestTable
where Area =...
May 12, 2009 at 9:55 am
I just used the CTE sample code I provided in post http://www.sqlservercentral.com/Forums/FindPost714447.aspx and
added the following lines to the table, without modifying the CTE's:
INSERT into #Table
SELECT 3456, 'Z', 2.30 UNION...
May 12, 2009 at 12:20 am
Please don't cross post!
I'd recommend to continue the thread on http://www.sqlservercentral.com/Forums/FindPost713955.aspx
since it contains more input from the OP so far...
May 11, 2009 at 2:30 pm
Hi,
you should consider using a calendar table.
A start point would be the code posted by GSquared in http://www.sqlservercentral.com/Forums/FindPost513748.aspx
May 11, 2009 at 2:10 pm
Hi Todd,
I used the first example from BOL (see "Using PIVOT and UNPIVOT") and modified it slightly to match the column names in order to get the following result without...
May 11, 2009 at 1:16 pm
You might want to look up "XQuery" in BOL.
The following link would show you a list of XML related threads of this forum with examples for almost every approach.
http://www.sqlservercentral.com/Forums/Forum21-1.aspx
If you...
May 11, 2009 at 5:31 am
What have you tried so far?
Did you look into DATEADD/DATEPART functions in BOL?
May 11, 2009 at 4:38 am
Hi,
the reason why a Pivot cannot be used with the original data is that you're not referring to an existing element.
Example:
For CUST_NO 1234 and 2345 Rule1 = 'I' but for...
May 11, 2009 at 12:27 am
Manie Verster (5/10/2009)
Now here is a generalization for you. I think...
May 10, 2009 at 1:19 pm
Since the number of PriceRules has a known limit, the following proposal should work:
step 1: use ROW_NUMBER to identify the first, second a.s.o. PriceRule per CUST_NO
and step 2: select the...
May 10, 2009 at 12:33 pm
First, I need to apologize for not paying enough attention that there is a link which refers to complexity theory. :angry:
I was under the impression that the question is regarding...
May 9, 2009 at 4:19 am
Did you look into SUM(Field) OVER (PARTITION BY ...)?
For more detailed information to we need more information from you.
Please see http://www.sqlservercentral.com/articles/Best+Practices/61537/ on how to post sample data.
May 8, 2009 at 3:13 pm
It seems like some of you folks had a chance to look at the 3rd-party code I'm struggling with at the moment...
You'll find almost everything that's mentioned already, but within...
May 8, 2009 at 2:13 pm
Hi,
that's exactly what the csv format is supposed to to:
save the data as Comma Separated Values.
What data do you expect?
Regarding your statement "I don't have the database anymore,..": How about...
May 6, 2009 at 12:50 pm
Please provide sample data with the result set you're expecting.
The statement "how to return the two columns together" is not clear.
When running your test code the result shows:
13
...
May 5, 2009 at 12:18 pm
Viewing 15 posts - 5,371 through 5,385 (of 5,502 total)