Viewing 15 posts - 4,006 through 4,020 (of 59,087 total)
I don't use availability groups but I can tell you that you're using what people recommend as supposed Microsoft "recommended" "Best Practices" for index maintenance. In fact, most of the...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 31, 2022 at 6:56 am
Instead of worrying about where the bloody semi-colon goes, someone needs to convince this fellow that this absolutely needs to be converted to a single value iTVF or "iSF" and...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 31, 2022 at 6:40 am
**** NOTICE!!!! Please see Scott's warning at https://www.sqlservercentral.com/forums/topic/restore-autmomation#post-3979292 on this subject below and my post right after his. I only use this method on "test" boxes and didn't stress...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 31, 2022 at 6:33 am
It doesn't matter if it's ZOOM or not... meeting usually flat out just suck because the person who is supposed to be running the meeting is one of the worst...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 31, 2022 at 1:24 am
Thanks the above query worked great. If I wanted to do a daily extract of records saying start at 00:00 to 11:59 how would that query look?
Thx.
What does that...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2022 at 1:54 am
Of course, an even better way would be to buy an up-to-date zip code database and do a lookup because not every number from 00000 to 99998 is a valid...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2022 at 1:38 am
Another possibility is a bit shorter, uses only LIKE instead of LIKE and the LEN() function, and does the same thing is...
IIF(D.Zip LIKE '[0-9][0-9][0-9][0-9][0-9]', d.Zip, '99999') AS...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2022 at 12:31 am
As a bit of a sidebar, my personal preference for assigning alias names to columns is not to use "expression AS aliascolumnname". I use aliascolumname = expression.
Some people don't like...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2022 at 12:20 am
Hey Ratbak,
Thanks again, I tried SELECT CAST('A1-'+CustomerID as text) as CustomerID FROM Customers
Get the message. Conversion failed when converting the varchar value 'C25-' to data type int. Any help...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2022 at 12:09 am
Use the test data you were kind enough to post (nicely done there), here's an answer that uses a CROSSTAB. If you actually DO want NULL to appear, just change...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 28, 2022 at 2:40 am
Perhaps the following but of study will convince you... 😀
https://docs.microsoft.com/en-US/sql/t-sql/queries/select-transact-sql?view=sql-server-ver15
https://www.w3schools.com/sql/sql_select.asp
https://www.techonthenet.com/sql_server/select.php
https://sql-server-tutorial-blog.blogspot.com/2022/01/sql-server-select-statement.html
--Jeff Moden
Change is inevitable... Change for the better is not.
January 28, 2022 at 2:02 am
Don't use functions in a WHERE clause, that's a very bad habit. Yes, SQL Server now generally covers for you with dates/datetimes, but not always, there are...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 28, 2022 at 1:54 am
every night we perform Index maintenance on that database
As a bit of a sidebar, I can almost guarantee that you're doing you index maintenance wrong. Spend more time doing...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 27, 2022 at 8:50 pm
I'd clean up the prod problem first. You can use a backup and research to research the other stuff, if you think it's necessary.
Only if you have a place...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 27, 2022 at 8:41 pm
Ummmmm... I don't see anywhere where the OP did an EXEC [art].[pCreateArtList_View]... 😉
You DO have to actually execute the stored procedure for IT to create the view.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 27, 2022 at 8:33 pm
Viewing 15 posts - 4,006 through 4,020 (of 59,087 total)