Viewing 15 posts - 556 through 570 (of 7,597 total)
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
No, a solution like this is hopefully only on few rows - as mentioned earlier, else change the way to solve the problem. And if my solution runs in...
December 19, 2022 at 8:46 pm
If you want only 12 months of data, then you'll need to restrict the ending date too. Assuming you want to include the month that @Date is in, then:
WHERE
tblPropsFreeRent.dtMonth >=...
December 19, 2022 at 7:04 pm
select *,
case when last_bar = 0 or next_to_last_bar = 0 then ''
else SUBSTRING(serialnumber,...
December 14, 2022 at 8:07 pm
I'd be surprised if an index on a computed column ultimately helped the query plan at all. Unless you have a fully covering index, which would likely duplicate most of...
December 14, 2022 at 3:06 pm
Viewing 15 posts - 556 through 570 (of 7,597 total)