Viewing 15 posts - 9,391 through 9,405 (of 10,144 total)
John
I reckon this...
[font="Courier New"] UPDATE [A] SET
[LAST_PAYMENT_DATE] = [P].[LAST_PAYMENT_DATE]
,[NEXT_PAYMENT_DATE] = .[NEXT_PAYMENT_DATE]
,[CUR_PAYMENT] = [P].[CUR_PAYMENT]
,[PMT_FREQ] = .[AVG_PMT_FREQ]
FROM [dbo].[Amortization] [A]
INNER JOIN [##PS] [P]
ON [A].[ID_NUMBER] = [P].[ID_NUMBER]
INNER JOIN [##PS]
ON [A].[ID_NUMBER] = .[ID_NUMBER]
WHERE [A].[TBL_SOURCEID] <> '1'
AND [P].[RECCNT] =...
November 18, 2008 at 10:57 am
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...
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
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,
...
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 ...
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...
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...
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...
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...
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...
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
...
November 18, 2008 at 7:51 am
Dooza (11/18/2008)
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...
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....
November 18, 2008 at 7:01 am
Garadin (11/18/2008)
November 18, 2008 at 7:01 am
Viewing 15 posts - 9,391 through 9,405 (of 10,144 total)