Viewing 15 posts - 2,071 through 2,085 (of 5,504 total)
Do you still use the XML variable?
If so, you might want o try loading the data into a table with an ID column (being the clustered index) and add an...
January 18, 2011 at 4:12 pm
Nicky Murphy (1/18/2011)
Very neat!Is there a way of grouping by other intervals e.g. a week or a month?
Yes.
Just change GROUP BY DATEADD(DAY, DATEDIFF(DAY, 0, TIMESTAMP), 0) to the range you...
January 18, 2011 at 4:05 pm
GilaMonster (1/18/2011)
Steve Jones - SSC Editor (1/18/2011)
Well this is a depressing few pages in The Thread.I could make it worse, but I think maybe I'll decline to
Let me guess: News...
January 18, 2011 at 11:53 am
GilaMonster (1/18/2011)
Consider a nonclustered index on (JobCardID, StageID, SubJobID, IsActive, CompletedDate, QueueID)
Gail, is there any specific reason to use all columns in the index instead of moving some to the...
January 18, 2011 at 10:36 am
Something like this?
Step 1: get the max value per day and number the result set.
Step 2: perform a self join with a row offset of 1.
; WITH cte AS
(
SELECT
ROW_NUMBER()...
January 18, 2011 at 10:18 am
Is there any specific reason for your duplicate post (here's the other one)?
Based on your visit count I think you've been around long enough to know better...
January 18, 2011 at 10:08 am
additionally, we have a duplicate thread.
@sravanb
After reevaluating the issues as Craig recommended, please take the time and read the first article referenced in my (and Craigs) signature on how to...
January 18, 2011 at 10:03 am
Is there any specific reason for starting two threads with the identical issue within one hour?
(http://www.sqlservercentral.com/Forums/FindPost1049494.aspx) :angry:
January 18, 2011 at 9:59 am
Why not using AVG() ... GROUP BY?
Edit: and what do you consider as being a "recent value"? You'd need a date to compare against, but I can't find one: The...
January 18, 2011 at 9:47 am
CELKO (1/17/2011)
...But thanks to Texas oil money, I can get a dictionary of a dead language :crying:
You're not talking about ANSI92 SQL "standard", are you? :hehe:
Edit: Over here in Europe...
January 17, 2011 at 4:50 pm
Next try:
First, select all signdate values and cross check it against the original table if there is a different client and the signdate is within the others client time.
; WITH...
January 17, 2011 at 4:48 pm
Ooopss!! Completely misunderstood the issue... I'm sorry!
I thought you were looking for overlapping time intervals...
Let's see if I can find a way....
January 17, 2011 at 4:39 pm
Here's an approach just based on selecting the data.
The basic concept: Unpivot the data to get on row per start and one per end date.
Based on the unpivoted data two...
January 17, 2011 at 3:46 pm
Jeff,
I'm expecting the sample section to be
[POL_COUNTRY_CD] [nvarchar](2) NULL,
[POL_LOCATION_CD] [nvarchar](5) NULL,
[POD_COUNTRY_CD] [nvarchar](2) NULL,
[POD_LOCATION_CD] [nvarchar](5) NULL,
At least that's what the sample data look like.
The new columns are [POL_LOCATION_CD] and [POD_LOCATION_CD]. Those...
January 17, 2011 at 1:42 pm
Viewing 15 posts - 2,071 through 2,085 (of 5,504 total)