Viewing 15 posts - 7,156 through 7,170 (of 8,760 total)
Here is another addition to the code, identifying the gaps more efficiently.
😎
USE TESTDB;
GO
;WITH BASE_DATA AS
(
SELECT
ST.STG_ID
...
September 6, 2014 at 12:53 pm
Not much of a change needed from last time, adding a second conditional in the last part to allow for missing HardDrink did the trick.;-)
😎
USE tempdb;
GO
CREATE TABLE #TEMP (UserName varchar(20),Drink...
September 6, 2014 at 9:10 am
ChrisM@Work (9/5/2014)
Eirikur Eiriksson (9/5/2014)
ChrisM@Work (9/5/2014)
Meatloaf (9/3/2014)
I trying to figure out the logic to add a number to the end of an ID to create a series.
For example, I have an...
September 6, 2014 at 7:03 am
Grant Fritchey (9/5/2014)
So, Eirikur, if you used DATE instead of DATETIME would that also solve the issue? Just asking. I don't know MySQL from MyElbow.
It is more a question of...
September 6, 2014 at 6:15 am
Quick question, can you post the two execution plans?
😎
September 6, 2014 at 3:49 am
More for fun, I'm tossing three more spanners in the works
😎
USE tempdb;
GO
/********************************************************************
Sample data
********************************************************************/
DECLARE @SAMPLE_DATA TABLE
(
SD_ID INT IDENTITY(1,1) NOT NULL PRIMARY KEY CLUSTERED
...
September 6, 2014 at 3:14 am
Here is a quick sample, should get you passed the hurdle.
😎
USE tempdb;
GO
CREATE TABLE #BOMTbl
(
ItemNo HIERARCHYID NOT NULL,
Lvl AS ItemNo.GetLevel() PERSISTED,
MatID VARCHAR(25)...
September 6, 2014 at 2:43 am
GilaMonster (9/5/2014)
Grant Fritchey (9/4/2014)
You never know. I get stumped all the time. That's why Gail's here.Wha?
Well, at least I have a purpose in life...
Looks like you have been "Granted" a...
September 5, 2014 at 12:15 pm
ChrisM@Work (9/5/2014)
Meatloaf (9/3/2014)
I trying to figure out the logic to add a number to the end of an ID to create a series.
For example, I have an EventID that may...
September 5, 2014 at 5:23 am
Quick thought, use aggregation and group by to eliminate the nulls (cross tab style)
😎
September 5, 2014 at 2:20 am
Phil Parkin (9/5/2014)
cstrati (9/5/2014)
Thanks for your reply.
Unfortunately I've ran your script and I'm getting the same 4 results.
It doesn't appear that the columns that are emtpy display when...
September 5, 2014 at 1:44 am
Jeff Moden (9/5/2014)
Eirikur Eiriksson (9/4/2014)
Jeff Moden (9/4/2014)
September 5, 2014 at 12:52 am
Jeff Moden (9/4/2014)
September 4, 2014 at 11:52 pm
Here is a quick demonstration of the formula I posted earlier (EventId * 10^(number of digits) + sub-event-id)
I am by no means recognizing this as a good practice, this is...
September 4, 2014 at 10:33 pm
Viewing 15 posts - 7,156 through 7,170 (of 8,760 total)