Viewing 15 posts - 1,366 through 1,380 (of 5,504 total)
Seems like you didn't really found the time to read the article I pointed you at...
The data are still not ready to use.
I'd also question the concept of having all...
June 25, 2011 at 4:14 am
Please have a look at the first link in my signature on how to provide sample data.
In your Excel file the data types per column are missing as well as...
June 25, 2011 at 3:57 am
I would test how many rows would the following join return:
Inner Join on CostPrice = CostPrice and Reference = Reference AND LastUpdatedDate <= TransactionDate.
Depending on the number of rows returned...
June 25, 2011 at 2:54 am
Oh, before I forget:
To get the result you're looking for (desc order), just add an "ORDER BY cte_tally.n DESC" to the code I posted. 😉
June 25, 2011 at 2:09 am
I have to ask again: why do you insist in using a loop?
Even if there is a set based solution available?
It seems like performance is not on your...
June 25, 2011 at 2:06 am
jkp2311 (6/24/2011)
Thanks for help me out.
But it is difficult for me using CTE.
anyway, i know we can do also another way using nested while loop.
it's much easier that...
June 24, 2011 at 4:59 pm
Steve mentioned the disconnects from any active clients when failover occurs for mirroring.
That's a major difference to a cluster configuration where the IP (or the system name) doesn't change. Since...
June 24, 2011 at 4:06 pm
If you insist in using a while loop: I don't know how to do it. 😉
But here's a set based solution:
declare @c1 int
set @c1 = 5
;
WITH cte_tally AS
(SELECT Number +1...
June 24, 2011 at 3:49 pm
Maybe this link will help you to narrow down the root cause.
As a side note: by choosing to post in a different language than English (especially in a thread header)...
June 24, 2011 at 3:29 pm
Craig Farrell (6/24/2011)
I'm not necessarily sure I'd want SET LANGUAGE to be changing my DATEFIRST once I've specifically set it anyway, so your concern is actually a benefit to me....
June 24, 2011 at 2:42 pm
You wold need to use dynamic SQL for such a requirement.
June 24, 2011 at 2:17 pm
@craig-2: I strongly vote against any method involving SET DATEFIRST and/or DATEPART(dw)
One of the (undesired?) side effects: once you have a specific SET DATEFIRST in your batch, any following SET...
June 24, 2011 at 2:07 pm
This is based on a week from Monday 12:00 AM to Sunday 11:59:59.999PM:
SELECT
FROM YourTable
WHERE YourColumn > = DATEADD(wk,DATEDIFF(wk,0, GETDATE() -1 ),0)
June 24, 2011 at 1:54 pm
First you need to define what a week is (e.g. does it start on Sunday or Monday or any other day? Is it based on ISO week (52 or 53...
June 24, 2011 at 12:42 pm
Viewing 15 posts - 1,366 through 1,380 (of 5,504 total)