Viewing 15 posts - 1,741 through 1,755 (of 3,500 total)
Where to start...
you need to get the age of each sale (or whatever it is) in days, so you can put them into [1-30], [31-60], [61-90] days old bins...
I'm calculating...
October 31, 2016 at 10:14 pm
Welcome to SSC,
Since you're new here, the first thing you should learn about is how to ask a good question. Jeff Moden wrote a terrific article on it, which...
October 31, 2016 at 5:49 pm
You should definitely read the article Jeff suggested. It's the only reason I'm thinking I shouldn't post this yet. It's just one of those "Ask a better question to get...
October 29, 2016 at 6:05 pm
Welcome to SSC.
You should read Jeff Moden's articles on Crosstabs, and how to post a question[/url]. Especially the latter, since you're new here.
Then there's Jeff's articles on Crosstabs/Pivots
October 26, 2016 at 8:13 am
Jeff,
My first thought was to be lazy and use DelimitedSplit8K but that would turn each occurrence into a separate record, right?
October 25, 2016 at 8:04 pm
You're welcome. Post back if you need more help. Here's my stub code.
use tempdb;
GO
DECLARE @TestString VARCHAR(250) = 'C1 User Unable to Log in C2 User did not set password...
October 25, 2016 at 4:51 pm
CHARINDEX requires 3 arguments, not 2.
I would start by doing something simple...
declare 3 variables of type INT and then get the position of C1, C2, C3. Then get the stuff...
October 25, 2016 at 4:23 pm
What message was returned when you tried it?
October 24, 2016 at 8:55 pm
Luis' answer is super cool...
The Calendar table has some advantages... you can filter out any pattern you want (certain days of the week, days of year, etc) and its super...
October 24, 2016 at 5:08 pm
So it's simple.
do an outer join to get the non-matching records, then wrap that in an insert statement.
INSERT INTO DestinationTable(col1, col2, col3)
SELECT colA, colB, colC
FROM SourceTableA a
LEFT JOIN SourceTableB b
ON...
October 24, 2016 at 3:13 pm
If you want to add the non-matching records and update the existing ones, read this thread... Paul White knows his stuff.
October 24, 2016 at 2:25 pm
You would need another table containing all the names, and then outer join it.
SELECT n.FirstName
, tS.CaseID
,...
October 24, 2016 at 1:34 pm
You could start with a standard Calendar/Date table and then add the Fiscal Month, Quarter, Year etc.
Here's [/url]a basic Calendar table
This one[/url] might be good for a Calendar dimension...
but...
October 24, 2016 at 11:45 am
There are Calendar table examples here...
Here's [/url]a really good intro
and then Marie Bayer wrote a bunch of scripts for creating them... here
October 24, 2016 at 10:18 am
You need a calendar table, though, so you can force the existence of days where there are no bookings. You do that like this:
SELECT ...
FROM Calendar c LEFT JOIN Booking...
October 24, 2016 at 10:13 am
Viewing 15 posts - 1,741 through 1,755 (of 3,500 total)