You would add WHERE NOT EXISTS to filter out rows you have already added.
As this appears to be some sort of assignment, I am only giving you a hint, now the full solution, but leave it to you to explore on your own. You learn better that way.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi, My Query is -
I have 2 SQL tables employee01 and employee02
employee01 has 100 rows. employee02 has 0 row.
employee01 -
What I want is - 10 unique rows to be copied from employee01 to employee02 in every 1 hour duration.
I want to know the Stored Procedure SQL query only.
I've done the Logic App for the Recurrence (every 1 hr copying part)
CREATE PROCEDURE [dbo].[GetEmployee]
AS
BEGIN
INSERT INTO employee02
SELECT TOP(10)FirstName, LastName
FROM employee01
END
-- Problem with My SQL query is that --
You would add WHERE NOT EXISTS to filter out rows you have already added.
As this appears to be some sort of assignment, I am only giving you a hint, now the full solution, but leave it to you to explore on your own. You learn better that way.