Viewing 15 posts - 871 through 885 (of 1,957 total)
SQL_ME_RICH (5/22/2013)
Well - that definitely changed things, but now it creates a whole new error all together (I went back to the first set of INSERT statements, and...
May 22, 2013 at 7:57 pm
Try this
DECLARE @ReportDate DATE;
SET @ReportDate='8 jan 2013';
WITH data AS
(
SELECT * ,ROW_NUMBER() OVER(PARTITION BY ConsumerID ORDER BY ActivityDate DESC) AS rn
FROM dbo.ConsumerActivity
WHERE ActivityDate <= @ReportDate
), cons AS
(
SELECT ConsumerId, MAX(CASE WHEN rn=1...
May 22, 2013 at 6:43 pm
Instead of replacing 'NULL' with '', try replacing 'NULL' with NULL
May 22, 2013 at 6:07 pm
marc.snoeys (5/17/2013)
There is nothing wrong with the INSERT-statement at all.
But, my personal opinion is that it would be more intuitive to be able to write an...
May 22, 2013 at 6:04 pm
Unfortunately, unless you mangled that XML while posting, you will have to use string processing on that as it is not valid XML.
May 22, 2013 at 12:51 pm
Got to say, just add a Manufacturer column and do away with the LIKE query...
May 19, 2013 at 4:20 pm
GilaMonster (5/19/2013)
Ow, that trigger is nasty.
that's an understatement...:-P
mayabee: Cursors and procedural code inside triggers are a really bad idea, consider writing the IDs to another table and have a separate...
May 19, 2013 at 4:04 pm
sqlguy-736318 (5/15/2013)
However, you mentioned a plugin could be written to use regions in a way that's...
May 15, 2013 at 5:19 pm
Craig's idea sounds great!
Before I saw it, I came up with this , which is similar but different to Wayne's method for tying the rows together...
Just including it as an...
May 13, 2013 at 4:33 pm
This is a very simple problem to solve.
Look at character 79 of that statement (as it tells you in the error message) and you will see this character : “
It...
May 13, 2013 at 3:57 pm
I can't see why this is in the results?
select 79673, 49202
Can you explain?
May 12, 2013 at 3:58 pm
sqlguy-736318 (5/11/2013)
How is region handling awful in SSMS 2012?Is it quirky and inconsistent or does it have a poor overall design?
Both.
It is single level and automatic, so you can't define...
May 11, 2013 at 5:27 pm
sqlguy-736318 (5/10/2013)
May 11, 2013 at 5:09 pm
GilaMonster (5/8/2013)
May 9, 2013 at 2:27 am
Can I wave the flag for separating out the logic completely, either in two distinct stored procedures (one for queries with the optional parameter, one without) or by use of...
May 8, 2013 at 3:47 pm
Viewing 15 posts - 871 through 885 (of 1,957 total)