Viewing 15 posts - 1,186 through 1,200 (of 2,645 total)
Yes, a strange result. Try this:
DECLARE @tmp1 FLOAT = 0.289;
SELECT CONVERT(decimal(38,36),ROUND(@tmp1, 2)*100),
CONVERT(decimal(38,36),ROUND(@tmp1, 2))*100
January 16, 2020 at 2:18 pm
-- drop all user defined stored procedures
Declare @procName varchar(500)
Declare cur Cursor
For Select [name] From sys.objects where type = 'p'
Open cur
Fetch Next...
January 16, 2020 at 11:11 am
Select PP_SUPP.PP_SUP_NO SupplierCode,
PP_SAD.PP_SAD_REF SupplierAddressCode,
GD_CST.GD_CST_FNAME SupplierFullName,
GD_CST.GD_CST_ADD1 SupplierAddressLine1,
...
January 15, 2020 at 6:49 pm
Looks ok to me.
If you want non-integer averages you can do this by adding 0.0 to the count:
with postcount (postid,postcount) as
(
select postid,count(relatedpostid)+0.0 as postcount
...
January 14, 2020 at 2:51 pm
January 14, 2020 at 2:44 pm
The plan looks the same, the estimates are the same, and it even continues to suggest that I create that same index that I just created. (Yes, it's really...
January 13, 2020 at 8:59 pm
What happens if you create the suggested index? Do both queries use it?
January 13, 2020 at 7:58 pm
There is no difference in the execution plan. Just the number of rows estimated.
January 13, 2020 at 7:37 pm
There is quite a lot wrong with your SQL, I've just pasted in something that will work.
drop table [dbo].[Table_1]
GO
drop table [dbo].[Table_2]
GO
CREATE TABLE [dbo].[Table_1](
[KEYU] [int] IDENTITY(1,1) NOT NULL,
[DATA1]...
January 13, 2020 at 7:36 pm
There is no difference in the number of reads, so maybe (as the optimiser is a bit of a black box), in that case, the optimiser doesn't change the order...
January 13, 2020 at 5:34 pm
If you run the queries with
SET STATISTICS IO, TIME ON
Is there any difference in the results? If so can you paste them in here?
January 13, 2020 at 4:56 pm
On thing I've noticed from a very quick look as that the left joins seem to be very similar.
I would look at combining the LEFT JOINS into one query on...
January 13, 2020 at 4:50 pm
I don't think it should make any difference, as the optimiser will/should work out the best order to execute the joins. So both queries should have the same execution plan...
January 13, 2020 at 4:11 pm
I don't understand what you want? What sort of ideas are you looking for?
January 13, 2020 at 4:02 pm
Another question that comes to my mind is the table structure is as below. I am not sure why would it end up having negative values if the identity...
January 11, 2020 at 1:44 pm
Viewing 15 posts - 1,186 through 1,200 (of 2,645 total)