Viewing 15 posts - 2,206 through 2,220 (of 7,608 total)
Yes, I believe you reading of the original plan was correct.
October 23, 2020 at 10:23 pm
I believe the error was because the first data type returned by the CASE is a varchar -- specifically 'Default Memory Settings - needs to be configured' -- and thus...
October 23, 2020 at 10:18 pm
You can fix the immediate problem by changing the code like so:
else cast(value_in_use as varchar(50)) end as SQLMemoryInUse
October 23, 2020 at 10:03 pm
I'd expect maybe a Shared lock and even a Schema lock on the table, but I don't think SQL would need to exclusively lock the table.
October 23, 2020 at 9:18 am
If you CAST the value to a different data type, such as decimal, SQL will automatically round the value for that type, so you will have to do a ROUND...
October 23, 2020 at 7:23 am
Should I add the Semester_ID Reference here?
I guess. What you really need to do is step back and do a true logical data model first including normalization. Your current table structures...
October 23, 2020 at 3:43 am
Also, btw, the data model you have is not correct. You should have a separate "master" Course table, with nothing about semester in it, that contains core info about...
October 23, 2020 at 3:40 am
It's likely your PK on Inventory should be ( WarehouseID, ProductID ), at least based on that query (of course if you have a significant number of queries that use...
October 23, 2020 at 3:35 am
I'd need directly usable sample data for the holiday table -- CREATE TABLE and INSERT statement(s) -- to correct this for you.
October 23, 2020 at 2:51 am
The problem is that you multiplied the minutes difference by 60; just get rid of the "60*".
SELECT CONVERT(CHAR(5), DATEADD(MINUTE, (DATEDIFF(MINUTE,CAST(@hFrom +':'+@mFrom AS TIME), CAST(@hTo +':'+ @mTo...
October 22, 2020 at 1:20 pm
> Missing the point on this last one - you have multiple joins, not just 1 join. <<
It depends on how you look at it. The view itself has only...
October 22, 2020 at 10:06 am
DECLARE @job_name nvarchar(128)
SET @job_name = 'JobA'
SELECT
job_name AS name,
COALESCE(CAST(j.enabled AS varchar(1)), 'Job not present') AS enabled,
CASE...
October 22, 2020 at 9:59 am
For SQL Express, you'd need to use the task scheduler in Windows directly, instead of using SQL Server jobs. It's more of a pain, but it should work.
You should explicitly...
October 22, 2020 at 1:36 am
That's why I put the note: my EXISTS example does NOT reference an outer table. A rare situation perhaps, but not impossible, more likely:
WHERE EXISTS(SELECT 1 FROM sys.tables WHERE name...
October 21, 2020 at 2:37 pm
Wouldn't that count every reference as a "join", including a select from a single table? And any other single select from a table.
SELECT ...
FROM dbo.table1
SELECT ...
FROM dbo.table1
WHERE EXISTS(SELECT 1 FROM...
October 21, 2020 at 12:55 pm
Viewing 15 posts - 2,206 through 2,220 (of 7,608 total)