Viewing 15 posts - 211 through 225 (of 297 total)
In SQL Server 2019 you can also utilize the GREATEST function.
October 8, 2021 at 12:54 pm
I now realize that my original response didn't fully appreciate that the originally case based select can't just be converted to a "normal" where clause where the criterias of the...
October 1, 2021 at 2:06 pm
Well, I'm not so shocked about the lack of stored procedures as you seem to be.
The use of stored procedures for any kind of web/object oriented programming has long been...
September 29, 2021 at 4:01 pm
You might get better answers if you made it more clear what your circumstances are and what you want to achieve. After all you posted your question in a forum...
September 28, 2021 at 5:55 pm
Not really sure, you seem to have used the logic from IPS.InOrOut = 'O'?
I would probably start by converting the original CASE-based logic to something more standard, like
September 28, 2021 at 4:33 pm
Well, I don't see a WHEN NOT MATCHED section, so how can you expect it to insert new rows?
https://docs.microsoft.com/en-us/sql/t-sql/statements/merge-transact-sql?view=sql-server-ver15
September 24, 2021 at 10:05 pm
Try googling "tsql running total" and you will see a number of tutorials about how to do that.
August 17, 2021 at 4:43 pm
Okay, I was wrong. It does seem to support proxy setup:
https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ms760236(v=vs.85)
https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ms763680(v=vs.85)
So you might want to fool around with those parameters, if you need to utilize a proxy in...
August 15, 2021 at 11:15 pm
Is the SQL server you're using allowed a direct outbound connection to the internet?
If you're using a proxy, then this must be set up in the internet settings on the...
August 15, 2021 at 10:52 pm
Hmmmm.... May I offer you a couple of alternatives that I find a tiny bit more elegant?
-- Set up test data...
DECLARE @CallLogCommonCount TABLE (
...
August 15, 2021 at 9:50 pm
You haven't really provided actionable data about what your data looks like and what you want to achieve, but here's a wild west shot from the hip:
declare
...
August 15, 2021 at 8:40 pm
Maybe something like this?
with
tcount as (
select codetypeid,code, count(*) as trows
from #test
...
August 12, 2021 at 9:25 pm
Could theoretically also be caused by a bug in SSMS. Are you using the latest version, i.e. 18.9.2?
August 12, 2021 at 8:55 pm
If I misunderstood and you want the alarm noticiation flag to control the selection criteria, then it's best to use two separate queries instead of trying to cram everything into...
August 12, 2021 at 7:36 pm
Uneducated guess:
DECLARE @AlarmNotification BIT
SELECT
mpe.MeasuringPointEntryID,
@AlarmNotification = CASE WHEN mpe.DateTimeEnd IS NOT NULL THEN 1 ELSE 0 END
FROM [location] l
JOIN...
August 12, 2021 at 7:23 pm
Viewing 15 posts - 211 through 225 (of 297 total)