Viewing 15 posts - 4,696 through 4,710 (of 26,490 total)
Something like this?
with TestData as (
select memid, MonthStartDate
from
(values
(123,'2014-01-01'),
(123,'2014-03-01'),
(123,'2014-04-01'),
(123,'2014-05-01'),
(123,'2014-06-01'),
(123,'2014-07-01'),
(123,'2014-08-01'),
(123,'2014-09-01'),
(123,'2014-10-01'),
(123,'2014-11-01'),
(123,'2014-12-01'),
(222,'2014-01-01'),
(222,'2014-02-01'),
(222,'2014-03-01'),
(222,'2014-04-01'),
(222,'2014-05-01'),
(222,'2014-06-01'),
(222,'2014-07-01'),
(222,'2014-08-01'),
(222,'2014-09-01'),
(222,'2014-10-01'),
(222,'2014-11-01'),
(223,'2014-02-01'),
(223,'2014-03-01'),
(223,'2014-04-01'),
(223,'2014-05-01'),
(223,'2014-06-01'),
(223,'2014-07-01'),
(223,'2014-08-01'),
(223,'2014-09-01'),
(223,'2014-10-01'),
(223,'2014-11-01'),
(223,'2014-12-01'))dt(memid,MonthStartDate)),
BaseData as (
SELECT
*,
rn = row_number() over (partition by memid order by MonthStartDate)
FROM
...
August 11, 2015 at 10:06 am
Jack Corbett (8/11/2015)
Sean Lange (8/11/2015)
August 11, 2015 at 9:42 am
Personally, I'd start with something like this and modify it as needed:
declare @BatchSize int = 5000, -- change as desired
@ArchiveDate DateTime =...
August 11, 2015 at 9:23 am
lcarrethers (8/10/2015)
I don't think they want to see any NULL values.
FYI, the NULL in this INSERT is NOT a null. It is a string whose value is the string...
August 10, 2015 at 3:44 pm
Also, is the string 'Null' a real Null or a string?
August 10, 2015 at 2:55 pm
Based on the above sample data, what is the expected results?
August 10, 2015 at 2:54 pm
lcarrethers (8/10/2015)
I get this errorMsg 537, Level 16, State 3, Line 1
Invalid length parameter passed to the LEFT or SUBSTRING function.
As I stated, it worked for what you provided. ...
August 10, 2015 at 2:38 pm
And Silver Spoon is definitely one of them.
August 10, 2015 at 2:17 pm
lcarrethers (8/10/2015)
(
createdon datetime,
kms_quoteorder varchar(15)
)
INSERT INTO test VALUES ('2015-07-22 16:13:39.000','15-37779/Rev7')
INSERT INTO test VALUES ('2015-07-22 19:54:56.000','15-37779/Rev8')
INSERT INTO test VALUES ('2015-07-22 20:26:41.000','15-35553/Rev9')
INSERT INTO test VALUES ('2015-07-22 21:32:31.000','15-35553/Rev10')
select * from test
So...
August 10, 2015 at 2:13 pm
bherbert (8/10/2015)
August 10, 2015 at 12:59 pm
sgmunson (8/10/2015)
Luis Cazares (8/10/2015)
August 10, 2015 at 12:18 pm
SQLRNNR (8/10/2015)
48 bottles of post on the thread, 48 bottles of post.Take one down, pass it around, 48 bottles of post on the thread
?? Start with 48, take one down,...
August 10, 2015 at 11:43 am
delizat (8/10/2015)
Lynn Pettis (8/7/2015)
delizat (8/7/2015)
Every situation is different, but this is the order of my backup jobs:1. Reorganize/Rebuild index
2. Check integrity
3. Update Statistics
4. Backup database.
Please tell me you aren't updating...
August 10, 2015 at 10:47 am
ebothun (8/7/2015)
Not a typo. There are lots of references to 11.2 out there, but I see no explanations about differences.See http://sqlserverbuilds.blogspot.com/ for example.
I don't see an 11.2.??.???? on the...
August 7, 2015 at 3:49 pm
delizat (8/7/2015)
Every situation is different, but this is the order of my backup jobs:1. Reorganize/Rebuild index
2. Check integrity
3. Update Statistics
4. Backup database.
Please tell me you aren't updating statistics on indexes...
August 7, 2015 at 2:10 pm
Viewing 15 posts - 4,696 through 4,710 (of 26,490 total)