Viewing 15 posts - 571 through 585 (of 7,616 total)
No, database and/or log backups would not cause this error.
January 9, 2023 at 5:38 pm
SELECT VendorName
FROM VenInfo
GROUP BY VendorName
HAVING SUM(CASE WHEN VenSN = 'Y' THEN 1 ELSE 0 END) * 100.0 / SUM(1) >= 80
January 9, 2023 at 3:25 pm
Nor trying to be difficult, but that just lists the values, it doesn't assign them as the table ID in the existing table, as stated in the OP.
January 6, 2023 at 10:40 pm
You could schedule a job to run on the first of the month, but immediately exit the job if that day is a Sunday. Add a second sched to that...
January 1, 2023 at 2:02 am
To be absolutely clear, you want a:
2) unique clustered [index] on (tenant,year,id)
And if you partition the data (which typically wouldn't be necessary here), partition it by...
December 30, 2022 at 10:11 pm
You can, and definitely should, get rid of the other ISNULLs in your WHERE:
AND ISNULL(d.value_2,'') NOT IN ('Clay','Volusia') --replace with --> AND d.value_2 NOT IN ('Clay','Volusia')
AND ISNULL(rc.referral_category_ud,'') <>...
December 30, 2022 at 9:43 pm
You can, and definitely should, get rid of the other ISNULLs in your WHERE:
AND ISNULL(d.value_2,'') NOT IN ('Clay','Volusia') --replace with
--> AND d.value_2 NOT IN ('Clay','Volusia')
AND ISNULL(rc.referral_category_ud,'') <> 'FFS_NO_TAKE_BAC' --replace with
-->...
December 30, 2022 at 5:29 pm
To be absolutely clear, you want a:
2) unique clustered [index] on (tenant,year,id)
And if you partition the data (which typically wouldn't be necessary here), partition it by (tenant, year)...
December 30, 2022 at 3:55 pm
It is. Google for function "dbo.DelimitedSplit8K". It's a function you install once and can use from then on for this.
December 30, 2022 at 3:54 pm
To be absolutely clear, you want a:
2) unique clustered [index] on (tenant,year,id)
And if you partition the data (which typically wouldn't be necessary here), partition it by (tenant, year) not just...
December 30, 2022 at 2:58 pm
Seems like you might be looking for a total?!:
SELECT yt.account_number, SUM(ca1.Debit) AS Total_Debits, SUM(ca1.Credit) AS Total_Credits,
SUM(ca1.Debit) - SUM(ca1.Credit) AS Net_Amount
FROM dbo.your_table yt
CROSS...
December 29, 2022 at 5:56 pm
Use COALESCE instead:
COALESCE(fa.S1SDAT, ar2.S1ADAT, ar.S1SDATE)
...
December 28, 2022 at 9:12 pm
Definitely use char(2) for the values, as suggested (varchar requires two bytes of extra overhead (to store length) per column).
If they're not already encoded, encode the names. That is, "Code1"...
December 26, 2022 at 7:50 pm
Yes, those procs will both run under the same transaction (assuming no COMMIT(s) in the procs).
December 22, 2022 at 9:20 pm
Viewing 15 posts - 571 through 585 (of 7,616 total)