Viewing 15 posts - 511 through 525 (of 754 total)
Why are you grouping by DonationYear when you're not selecting it? You could get multiple summary rows w/o the context of DonationYear.
What are the business rules/algorithm for ReceiptNumber? Just an...
February 22, 2022 at 10:46 pm
Unless you explicitly convert the datetimeoffset to the correct UTC time -- e.g., for SQL 2012 --
SWITCHOFFSET(@ComparisonDateAsDTO,'+00:00')
-- datediff or less than/greater than comparisons effectively ignore/strip off the...
February 21, 2022 at 10:26 pm
Deleted
February 21, 2022 at 7:36 pm
Do you really have a space after the comma in the strings? If so, you'll need to trim that.
This will handle the re-split (assuming the strings are consistent... Is the...
February 21, 2022 at 5:05 pm
In Windows 10/11, I get it when I right click the Start Menu icon, and select properties. Then on the Shortcut tab, click Advanced. "Run as Administrator" checkbox is on...
February 21, 2022 at 2:19 pm
If it's truly just (and always) 2020 that is/will be missing then just hard code a union all with 2020
If there are multiple years and/or some dynamic logic that determines...
February 21, 2022 at 2:13 pm
2 years!
DBCC ShrinkFile is pretty straightforward command, not sure how to make it more efficient.
That's the point -- it's not great and we can't make it better.
Why do you want...
February 16, 2022 at 8:57 pm
sp_tableoption [ @TableNamePattern = ] 'table' , [ @OptionName = ] 'large value types out of row' ,[ @OptionValue =] '1'
will force large data out of row.
February 15, 2022 at 2:18 pm
Create another job that runs every N minutes to monitor it, and execute msdb.dbo.sp_stop_job it if it's been running longer than the desired time.
The msdb.dbo.agent_datetime(run_date,run_time) function can be used to...
February 10, 2022 at 2:53 pm
Thank you for including DDL, but please use the insert/edit code sample so that your code is readable.

Not knowing the data, just guessing based on names &...
February 10, 2022 at 2:35 pm
Not an expert, but it looks like you might want to use Modern_Spanish_CI_AS collation (case insensitive, but accent sensitive -- so a = A but à <> a).
e.g., for a...
February 8, 2022 at 10:24 pm
You have Json nested at least 9-levels deep with something like 31 different objects/attributes.
What do you want to return and how? Do you want the data flattened (in which case...
February 3, 2022 at 2:33 pm
In order, you have a lot of columns that appear to be costs (or possibly quantities) that are defined as nvarchar rather than numeric/decimal.
If this is a vendor database or...
February 2, 2022 at 2:22 pm
It looks like the WITH syntax may be ANSI SQL-99 standard.
Joe Celko may be able to confirm/clarify.
February 1, 2022 at 9:14 pm
Viewing 15 posts - 511 through 525 (of 754 total)