Viewing 15 posts - 301 through 315 (of 753 total)
On top of echoing Jeff's concerns about deleting book details as sounding wrong/dangerous, I'd also question why are you trying to delete book details?
If it's about performance, then make sure...
August 24, 2022 at 7:31 pm
RedGate knows: https://www.red-gate.com/products/sql-development/sql-prompt/pricing
($179 for 1 license)
August 24, 2022 at 6:57 pm
DECLARE @batchCount INT = 4000;
DECLARE @deleteCount INT = 4000;
WHILE @deleteCount = @batchCount
BEGIN
...
August 24, 2022 at 6:53 pm
Install & use SSMS locally.
Don't run SSMS on the server. You don't want the overhead or security risks of remote desktop, let alone SSMS, on the server if you can...
August 24, 2022 at 4:35 pm
Just get the two dates and use them in your where clause with IN()...
DECLARE @today DATE = (SELECT GETDATE());
DECLARE @firstOfMonth DATE = DATEADD(day, 1, EOMONTH(@today, -1))
WHERE Date...
August 24, 2022 at 3:09 pm
Were the first and third choices deliberately identical?
August 24, 2022 at 1:32 pm
Just to be sure, when you say "VSS", are you good folks talking about "Visual Source Safe"?
Probably Volume Shadow Copy Service? Though I didn't know it left debris.
August 19, 2022 at 9:50 pm
2008 introduced assignment of variable in declare statement.
August 18, 2022 at 1:21 pm
August 17, 2022 at 2:53 pm
A case statement should work if there aren't too many variations -- e.g., something like
UPDATE table1
SET FK_category = CASE WHEN name1='John' and name2='Doe' THEN 1000
...
August 17, 2022 at 1:47 pm
I suspect this line should use IIF like the others, shouldn't it?
-SUM(IF(Fields!strType.Value="Rent_Tax",Fields!intDT.Value,0))
August 16, 2022 at 9:44 pm
Pictures don't provide any detail to analyze and aren't very useful.
Attaching an actual execution plan, or posting a link to actual plan on PasteThePlan would be much more useful.
August 16, 2022 at 9:42 pm
If they were bits, you could use the NOT operator (~) -- i.e.,
UPDATE dbo.table_name SET column = ~column
August 16, 2022 at 7:59 pm
Viewing 15 posts - 301 through 315 (of 753 total)