Viewing 15 posts - 271 through 285 (of 6,036 total)
This is how the query should look like:
SELECT inv.ProductID, ISNULL(inv.QTYonHand, 0)
FROM Inventory AS inv
WHERE inv.WarehouseID = 1
AND EXISTS ( select *
from Product P
inner join CatProduct...
October 27, 2020 at 1:04 am
A significant part of both PROD and test queries if Key Lookup on Product table. It might affect the plan selection too.
Including ProductTypeId into the index IX_Active_ActiveOnline might help a...
October 26, 2020 at 10:15 pm
People don't understand that a CTE is NOT executed first and then the rest of the query works against that as if it were a table with the possible...
October 26, 2020 at 10:02 pm
1st, as it's said, round() with the parameter,
2nd, FLOOR(),
3rd, if you store numbers with fixed decimal places you should be using DECIMAL data type for that, not REAL...
October 24, 2020 at 3:59 am
Don't implement is as a table.
make it into a view. May be dynamically created view, to handle changing requirements for the column set.
Then you're not gonna need to do horribly...
October 23, 2020 at 7:51 am
I’m not asking about the resultset, I know the entry must be there.
The question is - where do you get it from? I mean - FROM ( the keyword)
October 23, 2020 at 7:24 am
1st, as it's said, round() with the parameter,
2nd, FLOOR(),
3rd, if you store numbers with fixed decimal places you should be using DECIMAL data type for that, not REAL or FLOAT.
October 23, 2020 at 3:18 am
@ktflash..thanks but...your code returns well when the job exists but....
you code returns nothing if the job does not exist.
My requirement is if the job does not exist it should...
October 23, 2020 at 3:04 am
It's not EF, it's how SQL server handles procedures.
Metadata is retrieved during parsing time. Temporary tables are created and possibly modified in run time.
therefore, SQL Server has no means to...
October 22, 2020 at 12:26 pm
I posted the solution in your previous thread, Scott posted pretty much the same solution here, just above. The only difference is that I used one more left join -...
October 22, 2020 at 12:11 pm
Did you read my answer in your previous thread for this problem?
October 22, 2020 at 9:26 am
First, we're good boys and girls here, so we don't hardcode data. All the database/job names we put in some kind of table - temporary or permanent.
then we use outer...
October 19, 2020 at 8:37 pm
Joining a remote table is not a good move.
it has to be fully loaded to the local server, and then every row of it should be compared to every row...
October 19, 2020 at 7:49 am
Viewing 15 posts - 271 through 285 (of 6,036 total)