Viewing 15 posts - 1,726 through 1,740 (of 3,482 total)
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
If you're counting values per day, you're missing the Calendar table. If you left join the Calendar table to the table of scheduled events, then it's stupid easy. You need...
October 24, 2016 at 9:53 am
Something like this:
SELECT *
FROM
(SELECT 1 as PersonID, '2016-10-21 11:00' as evntTime, 'CLOCK_IN' as evntType
UNION ALL
SELECT 1, '2016-10-21 20:45', 'CLOCK_OUT'
UNION ALL
SELECT 1, '2016-10-22 3:45', 'CLOCK_IN'
UNION ALL
SELECT 1,...
October 23, 2016 at 10:31 am
Power BI is, to some degree, like Microsoft took all the PowerPivot/tabular tools out of Excel and put them in a standalone application. You can use it for data modeling,...
October 21, 2016 at 3:56 pm
Viewing 15 posts - 1,726 through 1,740 (of 3,482 total)