Viewing 15 posts - 256 through 270 (of 754 total)
You can create a view using linked server tables, including with joins to local tables. You can't create a view including linked server tables with schemabinding.
October 27, 2022 at 5:16 pm
Something like this using a tally table or function:
DECLARE @startDate date = '2021-01-06'
DECLARE @nextYear date = DATEADD(year,1,DATEADD(year,DATEDIFF(year,0,@startDate),0));
SELECT DATEADD(WEEK,Number,@startDate ) AS StartDate, DATEADD(DAY,6,DATEADD(WEEK,Number,@startDate )) AS EndDate, Number +...
October 27, 2022 at 4:16 pm
No.
Amazon recommends using their Data Migration Service for this scenario.
October 26, 2022 at 6:28 pm
The windows of time you can get will be constrained by when the server last restarted.
You could use sample_ms from sys.dm_io_virtual_file_stats to determine that start time. You would need to...
October 26, 2022 at 5:02 pm
Please read the links Johan provided.
If you want to modify data, then you need to use a stored procedure, not a user-defined function.
In SQL Server, a user-defined function is...
October 25, 2022 at 1:15 pm
What is the actual character? What does UNICODE(RIGHT(ColumnName, 1)) return?
That diamond character is the unicode Specials replacement character U+FFFD:
If that actually is the value stored, then it's likely the...
October 21, 2022 at 5:07 pm
What is the collation?
Does it look that way in SSMS (or another application/client?)
If SSMS, check this article for how to set grid to display unicode characters. It suggests Arial...
October 21, 2022 at 4:54 pm
I've attached the sample data
Where? I don't see any input data.
October 20, 2022 at 9:19 pm
Arithmetic overflow error converting nvarchar to data type numeric.
For what value(s)?
Can you provide DDL & sample data scripts to reproduce?
I realize this probably isn't your design, but it's a great...
October 20, 2022 at 8:16 pm
If it's varchar and not nvarchar...
That's probably not the actual character -- rather what SSMS is translating it to for display.
You can use a tally table or tally function (see...
October 20, 2022 at 6:01 pm
Is this for reporting queries? Is this approach driven by knowledge/belief that the query is too expensive to run repeatedly or blocks other processes? Are the tables used in the...
October 17, 2022 at 10:56 pm
October 17, 2022 at 7:21 pm
You can replicate to multiple subscribers on multiple servers.
Replication shouldn't care what edition.
October 14, 2022 at 10:27 pm
Check out Aaron Bertrand's article: What is the fastest way to calculate the median?
October 14, 2022 at 5:59 pm
@CleanupTime is in hours. Four weeks is 672 hours.
October 14, 2022 at 1:14 pm
Viewing 15 posts - 256 through 270 (of 754 total)