Viewing 15 posts - 571 through 585 (of 7,608 total)
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
Yes, it would. I took:
i want to select from 00:00:00 - 06:00:00
to mean a contiguous range from 00 to 06, but I likely should have used 00 and 05, if...
December 13, 2022 at 7:24 pm
To keep the query on the remote server "sargable", you shouldn't use any function on its columns in the WHERE, so something more like this (I may not have the...
December 13, 2022 at 7:19 pm
Glad it helped! Here's the 2nd version I mentioned: if you don't have more than 2 total dups, this might be easier to use.
--(2)
SELECT ID,
...
December 12, 2022 at 7:06 pm
WHERE DATEPART(HOUR, datetime_column) BETWEEN 0 AND 6
December 12, 2022 at 7:03 pm
Viewing 15 posts - 571 through 585 (of 7,608 total)