Viewing 15 posts - 1,201 through 1,215 (of 2,645 total)
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
how did you resolve your problem i have the same with my program too!
Can you post your problem?
January 4, 2020 at 9:58 pm
You would normally write the left join as:
;WITH cte_A AS ( SELECT * FROM (VALUES(1, 'A', 10),(2, 'B', 20), (3, 'C', 30)) AS data(key_col, col1, col2)
), cte_B...
January 3, 2020 at 4:02 pm
As the OP is using SQL 2017 there is an even easier way to get the results:
;with cte as
(
select *
...
January 3, 2020 at 3:54 pm
Hey Jon,
I troll these forums looking at other peoples issues so I can have a better understanding when I run into issues of my own.. That being said I'm...
January 3, 2020 at 3:20 pm
;with cte as
(
select *
from (values ('1230000045'),
...
January 3, 2020 at 1:43 pm
Viewing 15 posts - 1,201 through 1,215 (of 2,645 total)