Viewing 15 posts - 346 through 360 (of 7,191 total)
Yes, or WHERE CAST(CLOG.RecvdDate AS date) = '20191120'. I think casting as date preserves sargability (provided that the column is datetime in the first place).
John
November 22, 2019 at 11:00 am
Edit - ignore: posted at the same time as the one above,
November 22, 2019 at 10:34 am
If you change the port to a different one from that which it's using currently, then yes, you'll need to restart. If you plan to keep using the same port,...
November 22, 2019 at 10:00 am
Without being able to see your tables, it's difficult to advise. Have you tried capturing @sqlquery and running it from a query window?
By the way, your stored procedure is horribly...
November 22, 2019 at 9:22 am
If you're copying 60GB from one place to another, then it's not going to be quick - and how slow it is will depend on your hardware. Do you really...
November 22, 2019 at 9:14 am
What is not working? You haven't shown us what you've already tried. And please explain what you mean by "to set prior to start date"? In your expected results, each...
November 22, 2019 at 9:11 am
You can use the LAG function to get the start date of the next row. Give it a try, and post back if there's anything in particular you don't understand.
John
November 22, 2019 at 8:58 am
Check the value of SET QUOTED_IDENTIFIER for the connection with PowerShell, or just alter your script so that it uses [ ] instead of " " for identifiers.
John
John
November 21, 2019 at 2:11 pm
SentryOne and Redgate's SQL Monitor are two alternatives to SolarWinds - you may wish to see whether they offer better value. But if you want to do this stuff, I'm...
November 21, 2019 at 11:01 am
It's a CASE expression, not a CASE statement. I wouldn't normally be so pedantic, but here the distinction is important. An expression evaluates to a value, where as a statement does something,...
November 20, 2019 at 9:18 am
This is the only way that I know of doing it.
John
November 18, 2019 at 3:35 pm
Those tables are going to get inserted, updated and deleted as often as if they were in the publication database, so if it were me I'd use the same caution...
November 18, 2019 at 2:27 pm
(1) Because every non-aggregated column in your SELECT list appears in your GROUP BY clause
(2) Because the CASE expression doesn't have any effect on the Names, CardType partitions
John
November 18, 2019 at 11:38 am
I imagine for this you'd need a third table, a junction table, since a cycle has many parts and each part can be used in many cycles.
John
November 16, 2019 at 3:22 pm
I think you can put an EXECUTE AS clause in your trigger definition. Alternatively, use a SQL Audit instead of triggers.
John
November 15, 2019 at 4:57 pm
Viewing 15 posts - 346 through 360 (of 7,191 total)