Viewing 15 posts - 1,201 through 1,215 (of 2,648 total)
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
I can't say that I understand your question. What do you mean by: "--ex "t" has 1,200 , "t1" 1,100 means i want to see 100 to 99 t2 does not...
January 11, 2020 at 11:46 am
This will work for all dates between 1800 and 2400, it's more efficient than my previous proposed method
DECLARE @Eff_DateDATE;
DECLARE @Exp_DateDATE;
SET @Eff_Date = '01/01/2020';
SET @Exp_Date = '01/01/2021';
SELECT DATEDIFF(dd,@Eff_Date,@Exp_Date)
...
January 11, 2020 at 1:23 am
If you install this table valued function you could do it like this:
DECLARE @Eff_DateDATE;
DECLARE @Exp_DateDATE;
SET @Eff_Date = '01/01/2020';
SET @Exp_Date = '01/01/2021';
SELECT COUNT(Value) AS Days
FROM...
January 10, 2020 at 6:03 pm
I submitted a script to truncate tables that have referencing foreign keys. It doesn't do anything with triggers though I'm sure it can fairly easily be amended to do that....
January 9, 2020 at 1:13 pm
SELECT u.*
FROM (SELECT DISTINCT fl_group
FROM Freelancer t) t
CROSS APPLY(SELECT TOP(2) *
...
January 8, 2020 at 2:03 pm
Have you tried searching the internet for the error "0xC020844B"?
It looks like a timeout.
January 8, 2020 at 10:46 am
Since you've posted this in the SQL-2019 forum, you can use
STRING_AGG()(introduced in SQL-2017).Drew
Yes, good point
;WITH cte AS
(
SELECT *
FROM (VALUES (1,'ABD'),
...
January 7, 2020 at 4:02 pm
;WITH cte AS
(
SELECT *
FROM (VALUES (1,'ABD'),
(1,'ACD'),
...
January 6, 2020 at 6:13 pm
John Roberts- Not sure about the errors, I don't get these when I use any of the code I've included. The 2 CREATE TABLE statements and the DELETE all...
January 6, 2020 at 5:23 pm
Your SQL gives errors:
Msg 1767, Level 16, State 0, Line 42
Foreign key 'FK_ACCT_CHILD_TABLE' references invalid table 'dbo.ACCT'.
Msg 1750, Level 16, State 0, Line 42
Could not create constraint....
January 6, 2020 at 4:31 pm
Viewing 15 posts - 1,201 through 1,215 (of 2,648 total)