Viewing 15 posts - 616 through 630 (of 2,648 total)
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,...
December 26, 2022 at 8:02 pm
I think I would resort to the RBAR cursor method:
DROP TABLE IF EXISTS #Results;
CREATE TABLE #Results(Score int, ActivationTime datetime, Grp int, BaseDate date)
DECLARE @Score int, @ActivationTime datetime
DECLARE...
December 26, 2022 at 3:35 pm
Yes and the Value field is varchar(02), it needs to hold "1", "2", or "NA".
It would save 2/3rds of the memory required if it could be...
December 25, 2022 at 11:17 pm
Yes and the Value field is varchar(02), it needs to hold "1", "2", or "NA".
It would save 2/3rds of the memory required if it could be a numeric...
December 25, 2022 at 12:12 am
The maximum row size in SQL Server is 8,060 bytes. If you get near this then you might come across performance problems with page splits when updating rows. For this...
December 24, 2022 at 6:18 pm
It's for a clinical situation. I guess later it can be delivered as a .csv. For now my manager wants to review data and he wants to see it...
December 24, 2022 at 5:37 pm
BTW... the documentation for the subject of "trailing blanks" NOT being included in comparisons is a bit difficult to find. You would think that MS would have...
December 23, 2022 at 8:29 pm
The maximum number of columns in a query is 4096 so you couldn't query 7000 columns.
Would be good if you could go into a bit more detail about what is...
December 23, 2022 at 6:04 pm
Eirikur Eiriksson wrote:Excuse the pun, but -40 is F**C cold 😉 😎
Or as I told my wife after shoveling snow yesterday, "it is RFC"
How do you persuade your wife to...
December 23, 2022 at 5:42 pm
BTW... the documentation for the subject of "trailing blanks" NOT being included in comparisons is a bit difficult to find. You would think that MS would have included it...
December 23, 2022 at 5:00 pm
Sorry but the "correct" answer is wrong. The insert into Numbers is:
SUBSTRING( gift, 1, CHARINDEX(' ', td.gift)) = n.word
Will fail for the first row because SUBSTRING( gift, 1, CHARINDEX('...
December 23, 2022 at 3:21 pm
Yes, the 2nd is what I have asked.
But the replace
DECLARE @String NVARCHAR(MAX) = N'Lorem DO ipsum BE dolor BO sit amet, consectetur adipiscing elit'
SELECT *
FROM...
December 23, 2022 at 12:11 pm
Are you saying it returns rows if you uncomment that line?
If so that doesn't seem possible as adding an AND will just increase the constraints on the query so it...
December 22, 2022 at 6:02 pm
There is a scoped configuration that can be set in SQL 2019 to improve the performance of scalar UDFs:
To check its value:
select * from sys.database_scoped_configurations
December 22, 2022 at 5:13 pm
I've just pasted in my results in my last comment above. Your results are very different to mine.
I thought Microsoft made a change in a previous release of SQL Server...
December 22, 2022 at 2:28 pm
Viewing 15 posts - 616 through 630 (of 2,648 total)