Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE PROCEDURE GetConsumers
- @ConsumerCode bigint = 0,
- @ReloadDate datetime
- AS
- BEGIN
- SET NOCOUNT ON;
- DECLARE @Consumers TABLE (id INT IDENTITY PRIMARY KEY, consumer_code BIGINT, reload_date DATETIME);
- INSERT INTO @Consumers (consumer_code, reload_date) VALUES
- (4, '2016-04-04'), (5, '2016-04-05'), (6, '2016-04-06');
- SELECT * FROM @Consumers WHERE reload_date >= DATEADD(dd, -10, @ReloadDate);
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement