Viewing 15 posts - 241 through 255 (of 748 total)
Then none of those columns in any of the rows evaluate to valid NUMERIC(10) values. e.g., they might have spaces, punctuation, or alpha characters... or actually be null.
Do a select...
November 4, 2022 at 7:52 pm
Can you provide an actual execution plan?
How many rows are in tblPolMaster? tblPolSpec?
How many rows are returned by the query?
Is tblPolSpec a generic Entity-Attribute Value lookup table? Do you have...
November 4, 2022 at 6:05 pm
Why are all the columns being selected via subqueries rather than joins?
November 4, 2022 at 6:02 pm
It's just a filter:
WHERE getdate() >= glfStartDate AND getdate() <= glfEndDate
November 3, 2022 at 2:31 pm
Based on other articles, it appears you can change the data type of a column not used in the partitioning function/primary key.
November 1, 2022 at 9:30 pm
Parentheses.
You probably want
and ([Error] LIKE 'Delivery Flushed'
OR [Error] LIKE '%offline%'
OR [Error] LIKE '%online%')
October 28, 2022 at 4:15 pm
That's Oracle, not TSQL.
What's the error?
NVL2 (or COALESCE) seems like the better option anyway -- simpler, clearer.
October 28, 2022 at 2:23 pm
Yes, I have the fnTally function. When I run your code the way it is, it errors "Invalid column name 'Number'
Sorry. His version uses "N". I modified my version to...
October 27, 2022 at 6:30 pm
Do you have Jeff's fnTally function and did you test it? It is a TVF that in this case returns numbers 1-52...
after I fixed the script to return Number + 1...
October 27, 2022 at 5:22 pm
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
Viewing 15 posts - 241 through 255 (of 748 total)