Viewing 15 posts - 3,991 through 4,005 (of 59,067 total)
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
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
Viewing 15 posts - 3,991 through 4,005 (of 59,067 total)