Viewing 15 posts - 331 through 345 (of 59,069 total)
To follow up on Eddie Wuerch's good post, it's an old but powerful bit of ancient code known as a CROSSTAB. You can get a good introduction to them in...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 4, 2024 at 12:56 am
I'm not a ninja at it but you could try it in a "Maintenance Plan". To execute a proc, you would use an execute SQL block. You could have the...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 2, 2024 at 4:13 am
Here's another method. I got this idea for Piet Linden's post above. We could work on the dates as he suggested because your latest data has overlapping date ranges but...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 31, 2024 at 5:09 am
Thanks Jeff, that worked well.
Can I ask you to explain how it works, as reading it does nto make a lot of sense.
Kind regards.
Sure...
If we look at the original...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 31, 2024 at 4:01 am
I am still evaluating how to apply this to an existing table..
And there's the rub. Please provide 5 to 10 rows of readily consumable data for use to operate...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 31, 2024 at 1:42 am
Alan... you might want to explain what the bernieML.samd. stuff is.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 31, 2024 at 1:16 am
There should be an additional lesson learned here... when doing modifications to rows, start with BEGIN TRANSACTION and then run the UPDATE. If the rowcount is right, then COMMIT else...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 31, 2024 at 12:08 am
You can have a look at sys.dm_db_index_usage_stats() to see if there have been any reads or writes since the last time the SQL Server Service was started.
Once you've decided that...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 30, 2024 at 11:58 pm
Hello everyone,
I need your help. I have a “datetime” column (data type is Varchar(64) )with the following content: Sun Sep 29 2024 09:28:55 GMT+0000 (Coordinated Universal Time)
I would...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 30, 2024 at 11:55 pm
Try this... notice the only change is a couple of left outer join's for the drivers table (the word OUTER is optional... I left it out). I not only did...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 30, 2024 at 12:08 am
First, thank you for helping us help you by posting the readily consumable data code.
Ed B.'s code is good, although I'll never use PIVOT because of the issue he pointed...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 29, 2024 at 11:48 pm
Thanks for this. It confirms my googling explroations, and I'm about to try it.
I wonder what will happen on those requests where a driver hasn't yet been allocated. They...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 28, 2024 at 8:50 pm
It turns out that I simply misread the dd/mm/yyyy format of the expected answer and the original code that I posted was just fine. Here's that post again...
Apparently, you didn't...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 28, 2024 at 6:16 pm
Sorry... made a mistake... will repost in, hopefully, a couple of minutes.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 28, 2024 at 6:07 pm
Sorry... made a mistake... will repost in, hopefully, a couple of minutes.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 28, 2024 at 6:04 pm
Viewing 15 posts - 331 through 345 (of 59,069 total)