Viewing 15 posts - 9,391 through 9,405 (of 10,143 total)
Hi Michael, thanks for your generous feedback.
Yes, you're correct on both questions. Check that orderdate does have the time component - some systems remove it.
Run the query, see what it...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 18, 2008 at 10:46 am
Good point Homebrew, however rather than risking locking users out of a live table, I'd run the update checks against the copy 😎
Cheers
ChrisM
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 18, 2008 at 10:06 am
Hi John, I reckon this must be close...
[font="Courier New"]IF OBJECT_ID('tempdb..##PS') IS NOT NULL
DROP TABLE ##PS
CREATE TABLE ##PS
([ID_NUMBER] DECIMAL(25, 0) NOT NULL,
[PAYMENT_DATE] DATETIME,
[AMOUNT] FLOAT,
[RECCNT] INT,
...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 18, 2008 at 9:50 am
Nice work John. Lastly, you want the results to look like this? Resetting for each ID_NUMBER?
ID_NUMBER PAYMENT_DATE ...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 18, 2008 at 9:27 am
Hi Michael
If orderdate is datetime then it doesn't matter if there are more than one order per customer on the same day, because they're unlikely to be exactly the same...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 18, 2008 at 9:13 am
Looking good John, and making a lot more sense now. Next thing is for you to give us some sample data in the form of a table script, which contains...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 18, 2008 at 8:42 am
Hi "mr"
This should do the trick unless you have multiple orders per customer on a single day, in which case a small change will be required.
[font="Courier New"]DECLARE @MinOrderDate DATETIME, @ExcludeDateMin...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 18, 2008 at 8:36 am
Hi John
I understand your frustration, which is why I asked if you could put into words what you are trying to achieve. Small changes in this kind of update will...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 18, 2008 at 8:08 am
It sure would be difficult Seth, but you don't have to come all the way over here for decent beer - have you tried Oregon Ales? Look out for Dead...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 18, 2008 at 7:57 am
Hi John
Can you describe in words what you're attempting to do with this part of the statement:
SET @V1 = [COL1] = CASE @vEVAL = TRUE THEN 1 ELSE 0 END
...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 18, 2008 at 7:51 am
Dooza (11/18/2008)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 18, 2008 at 7:26 am
Dooza (11/18/2008)
Which pub in Reading? I visit every now and then, as I only live in High Wycombe.
Heh I used to work near you, Gerrards Cross, two contracts about 3...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 18, 2008 at 7:07 am
Dooza (11/18/2008)
Its nice seeing a post turn off-topic without being shut down immediately.
Shhhh....
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 18, 2008 at 7:01 am
Garadin (11/18/2008)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 18, 2008 at 7:01 am
Garadin (11/18/2008)
Actually, the answer was coffee. Keep practicing!
Coffee? I was projecting an image of a well-hopped bitter on my desk but sadly it remained exactly that - an image!...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 18, 2008 at 6:48 am
Viewing 15 posts - 9,391 through 9,405 (of 10,143 total)