Viewing 15 posts - 4,021 through 4,035 (of 59,087 total)
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 some restrictions. ...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 27, 2022 at 8:25 pm
Don't rely on the DB_ID() to reference a db. Assume it could change at any time.
If you'll notice, in its system tables, MS stores the db name rather than...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 27, 2022 at 8:21 pm
Not sure what you are alluding too but I tried all three options without creating a new database and in each case the id was reused. Only the following...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 27, 2022 at 8:18 pm
We are using the sql agent job to take the local drive backup of all the databases on the source and having sufficient permissions on the destination server .xp_CmdShell...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 27, 2022 at 2:55 pm
@ktflash - Just as a suggestion to help clarify exactly what you want for future posts.. It would be helpful if you'd post a clipping of a spreadsheet or columnized...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 27, 2022 at 2:52 pm
And here is the the result I need:
businessdayColumnNameColumnViewBUSINESS_RISKMARKET CREDMONETARY FUND
2022-01-01ABCDIM_VIEW2.351.35 / $2.404.80
2022-01-01ABCAPP_VIEW0.95nullnull
2022-01-01DEFDIM_VIEW1.15 / $0.90null71.70 / $122.47
2022-01-01DEFAPP_VIEW5.60nullnull
2022-01-01GHKAPP_VIEW3.85 / $10.08nullnull
The pivot columns can vary from week to week....
--Jeff Moden
Change is inevitable... Change for the better is not.
January 27, 2022 at 2:46 pm
Out of curiosity, did some tests
Offline/Online - No Change Detach/Attach - No Change Delete/Restore - No Change
However if you attach or restore a database with an id that is...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 27, 2022 at 2:21 pm
In real life, I've created views from stored procedures with no problems at all using dynamic SQL. There were two reasons to do so... "Pass through" views to support "Swap'n'Drop"...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 27, 2022 at 2:03 pm
I don't believe it actually hit the streets. I think it was only in preview version.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 27, 2022 at 2:25 am
Our database is a pretty complicated enterpirse database which has many tables. we do want data to make sense, and this is for our training enviroment, it has to...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 27, 2022 at 1:17 am
I haven't tried it but, perhaps, Detaching/Attaching. I think that Offline/Online would still keep the same value.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 27, 2022 at 1:12 am
Heh... speaking of "better" for DevOps, I tried to rate the post and I'm logged in and yet it still says that I have to login to rate it and...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 26, 2022 at 11:02 pm
Ok... no response from the WebMaster on this issue. @steve-2 Jones... any help here?
Heh... probably not because you're probably not being notified of this post, either. 🙁
--Jeff Moden
Change is inevitable... Change for the better is not.
January 26, 2022 at 10:51 pm
Good stuff!
I use the dbatools to do the same things. https://dbatools.io/commands/
There are a few different commands that copy logins and permissions between servers.
I've not delved into DBATools.io much. Which...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 26, 2022 at 10:44 pm
I'm a bit confused. Can you post the actual value of what FileSize is BEFORE your modifications, please? Also, what are you using as a reporting tool?
--Jeff Moden
Change is inevitable... Change for the better is not.
January 26, 2022 at 10:42 pm
Viewing 15 posts - 4,021 through 4,035 (of 59,087 total)