@Yano_of_Queenscastle My sleeping isn't so good at the moment - I had snoozed for a while but awoke at 02:30 (2:30 AM in freedom units) - where is it 4AM when the UTC time is 02:48? Assuming that the Heap uses UTC in it's display? It appears to do so here.
@Yano_of_Queenscastle Me too - the grumbling's already started!
@Vérace I rounded up a bit, but Czechia is at UTC+1 (at times, at least). I think The Heap™ actually uses some local time. At least for me it always shows right time.
@Vérace We use the boring Central European Timem that is UTC+1 or UTC+2, depending on seasons. We might be small country, but no obscure archipelagos here!
@Charlieface Its population is less that of Lisburn - that's *obscure!! :-)
@Yano_of_Queenscastle Oh - when I search for "Queenscastle" I get some obscure place in Missouri (or Wyoming... or somewhere else I may have flown over... ). :-) Oops, just checked - it's even worse than I thought - it's in Indiana - saw it once (Gary) from the viewing gallery of the John Hancock building in Chicago!
Windsor Castle is a royal residence at Windsor in the English county of Berkshire, about 25 miles (40 km) west of central London. It is strongly associated with the English and succeeding British royal family, and embodies almost a millennium of architectural history.
The original castle was built in the 11th century, after the Norman invasion of England by William the Conqueror. Since the time of Henry I (who reigned 1100–1135), it has been used by the reigning monarch and is the longest-occupied palace in Europe. The castle's lavish early 19th-century state apartments were described by the art...
Interesting, so even though it was often known as Krajova in Hungarian and German, it actually comes from králové in Czech which means queen, rather than the unrelated Slavonic root krajina (or krai) which means border.
I always assumed they speak like that mostly to confuse tourists from Prague. The better the connection between the capital and the regions, the more homogeneous the language becomes.
okay, stored procedure compile time parameters aren't in the execution plan. there's no optimize for unknown hint, there are no local variables in use, and parameter sniffing is not turned off as a database scoped configuration. is there anything else that would mess that up?
I have this stored procedure that I want the max startDate base on AgentId or without the AgentId. The way I am doing this is using a if else and wanted to see if there was a better way to do this?
IF (@AgentId = 0)
BEGIN
SELECT top (1)max(cgv.StartDate) as AgentLatestPublishedD...
@ErikReasonableRatesDarling Ok, well it's a mystery then. If it were me, I'd try collecting plans in different ways to see if it was specific to QS or not. Then again, you might be OPping and there's some crucial detail missing.
Current solution
Your version is certainly not the worst. Main problem is you have the same code twice, which has some maintenance overhead (i. e. all changes must be applied to both code blocks).
But T-SQL is not Java or C# - it doesn't give you as many tools for code deduplication (and many of ...
Answer renders comments obsolete
Quashed
If I were a picky sort of person, I would say a flag would have been helpful