Viewing 14 posts - 1 through 14 (of 14 total)
Now, I don't want to be rude but:
Having sample data that explains the full scenario at the start is always helpful. Smile
Which is why...
December 10, 2018 at 9:23 am
@Phil
You're right Phil. In an attempt to remove unnecessary details from a much more complex query, I forgot to mention some important aspects of the problem.
I'll try...
December 7, 2018 at 6:54 am
Thanks Drew, actually your solution works well for the given dataset, but it assumes facts about data:
If tomorrow my user decides to rename the states State_Z and State_A instead...
December 7, 2018 at 4:42 am
Hi smugson,
I'm sorry but it doesn't do the trick:
CREATE TABLE #TAB1(
ID INT
,MY_STATE VARCHAR(10)
,EVENT_TS DATETIME
)
INSERT INTO #TAB1(ID, MY_STATE,...
December 5, 2018 at 9:35 am
I think Phil's solution works better in the case with more than one states but I'd really like to get the most of this example - for me it's so...
November 22, 2018 at 2:23 am
@thom-a uhm, if you insert also the following line:INSERT INTO #TAB1(ID, MY_STATE, EVENT_TS) VALUES (1, 'STATE_2', DATEADD(DAY,2, GETDATE()))
the solution you suggested returns STATE_2...
November 21, 2018 at 7:09 am
allan.ford17 - Thursday, October 18, 2018 5:10 PMThe art of writing beautiful queries?
It was just a figure of speech - at...
October 19, 2018 at 1:53 am
I agree with you @Phil Parkin but in this case the ETL has a hierarchical structure (4 levels). Each team has its own branch and when we work on leaf...
October 17, 2018 at 6:59 am
I'd prefer free but I'm willing to invest few hundred bucks if needed.
In case of paid courses I'd like to know if they go staight to the point...
October 17, 2018 at 6:41 am
Uhm, got it.. So we'll keep raising hands to get a priority on a development branch. Somehow I was hoping for a more computer-aided solution but your replies are more...
October 17, 2018 at 4:42 am
Not sure, because I don't own a copy of 64-bit version.
However, after some research I believe you're right. The best solution would be to upgrade to 64-bit version (extending...
July 24, 2018 at 2:07 am
@Chirs yes, the IDs are unique but thanks for the hint regarding the join-free correlation, that way the query is much more readable.
After investigating the issue I finaly...
July 4, 2018 at 3:19 am
Hi Lynn,
first of all, my sincere apologies for not posting the question in a better fashion, I'll try to improve next time I post a question.
Thank you for...
July 3, 2018 at 10:03 am
Thank you all for the answers:
@scottpletcher: no worries, no '*' in the view 🙂
@Joe_Torre: Before posting I run sp_updatestats but nothing has changed. Am I missing...
March 19, 2018 at 1:59 am
Viewing 14 posts - 1 through 14 (of 14 total)