Viewing 15 posts - 2,251 through 2,265 (of 2,912 total)
This sounds like a job for a trigger.
You would create an AFTER INSERT trigger on tbl1 and in that you put your append query.
https://docs.microsoft.com/en-us/sql/t-sql/statements/create-trigger-transact-sql
Syntax:
March 7, 2018 at 10:06 am
I just tried a subset of this on my system (SQL 2016 SP1) and got the same result you did. My subset test was:CREATE TABLE #test (s...
December 13, 2017 at 12:42 pm
When you run these scripts, do you run the entire SB_Target_master.txt on the target server and then run the entire SB_Source_master.txt or even in the reverse order?
The...
December 8, 2017 at 11:18 am
I could be wrong on this as I have not built a trigger like that before, but I fairly confident that the INSERTED table is only visible to your trigger,...
December 7, 2017 at 2:50 pm
I may be mistaken on this, but I think that the problem is that @Dimension is not containing a single int value. You say that it is multiple selects. So...
November 22, 2017 at 3:23 pm
I agree with Sue here; the new CE wasn't indroduced in 2012. Plus the OP indicated that updating statistics on the 2008 one caused the 10 minute run as well.
November 20, 2017 at 9:26 am
I am glad you figured it out. I am a little confused why what I wrote didn't work though.
Did you change any of the code I posted? It...
November 20, 2017 at 8:54 am
From my understanding, UNMASK is a database level permission.
I think what would likely be the best way to manage this would be to create a user without login that...
November 16, 2017 at 8:26 am
for others wanting to help, here is the DDLDECLARE @tblLineItems TABLE
(
[LineItemID] INT ,
[JobID] INT
);
DECLARE @tblCostCodes TABLE
(
[costCodeID] INT ,
[costCode] VARCHAR(25)
November 15, 2017 at 8:17 am
rn is the "rn" column from the cte which is the row number partitioned by staff_id, ordered by transaction_Date
What version of SQL are you using? I ran the above...
November 15, 2017 at 7:29 am
SQL doesn't by default have an "order" to return your result set by. So when you issue a command like "SELECT Transaction_Date FROM Employee_Change", depending on various factors, you could...
November 14, 2017 at 2:18 pm
You are missing some data there... or I misunderstand the request.
is the attached table the expected output, the sample input or something else? If it is the sample input,...
November 14, 2017 at 1:44 pm
We actually have a similar setup where I work and it was a lot of trial and error to get thigns to work optimally.
Even after we thought we had...
November 14, 2017 at 1:19 pm
I've been trying to reply to this thread all day.
I apologize for the misinformation. I did more snooping and I am definitely incorrect in what I had posted....
November 7, 2017 at 3:26 pm
Possibly? I personally have not experienced that specific issue.
Are you using BIDS 2008 (inside Visual Studio 2008) to create the report? I've seen other SQL things have issues...
November 7, 2017 at 7:23 am
Viewing 15 posts - 2,251 through 2,265 (of 2,912 total)